Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ if(USE_MPI)
endif()

add_subdirectory(unit)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfoPortable")
add_subdirectory(physics)
endif()
4 changes: 3 additions & 1 deletion tests/python/physics/lgrngn_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ def test(RH_formula, _step_count, substep_count, exact_substep, constp, opts_dt)
rhod, th, rv, p = initial_state()
rv_init = rv.copy()

# in constp mode, th_std is expected instead of th_dry
# constp mode works with th_std, not th_dry (at least that's the typical way...)
if constp == True:
# dry/std conversions assume p = rhod (Rd + rv * Rv) T
# which in general is not true in constp, but is true at init so we use it here
th[0] = common.th_dry2std(th[0], rv[0])
opts_init.const_p = True
opts_init.th_dry = False

th_init = th.copy()
prtcls = lgrngn.factory(backend, opts_init)
Expand Down
2 changes: 2 additions & 0 deletions tests/python/physics/lgrngn_cond_substepping.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def test(RH_formula, step_count, substep_count, exact_substep, constp):
# which in general is not true in constp, but is true at init so we use it here
th[0] = common.th_dry2std(th[0], rv[0])
th_ss[0] = common.th_dry2std(th_ss[0], rv_ss[0])
opts_init.const_p = True
opts_init.th_dry = False

prtcls = lgrngn.factory(backend, opts_init)

Expand Down
2 changes: 1 addition & 1 deletion tests/python/physics/puddle.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def lognormal(lnr):

assert(tab_out[0][0] == 0.)

puddle_expected_per_cell = {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 7.087802417148837e-05, 9: 5.630090090571395e-06, 10: 815411.5}
puddle_expected_per_cell = {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 7.087802417148837e-05, 9: 5.630090090571395e-06, 10: 815411.5, 11: 0.0}

for a in puddle:
print(puddle[a], Opts_init.nx * puddle_expected_per_cell[a])
Expand Down
Loading