Skip to content

Commit

Permalink
test fix, format
Browse files Browse the repository at this point in the history
  • Loading branch information
trontrytel committed Aug 28, 2023
1 parent 10a4579 commit 5282974
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion test/TemperatureProfiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ parameter_set(::Type{Float32}) = param_set_Float32
_grav = FT(TP.grav(param_set))
_R_d = FT(TP.R_d(param_set))
_MSLP = FT(TP.MSLP(param_set))
_p_ref_theta = FT(TP.p_ref_theta(param_set))

z = collect(range(FT(0), stop = FT(25e3), length = 100))
n = 7
Expand Down Expand Up @@ -63,7 +64,11 @@ parameter_set(::Type{Float32}) = param_set_Float32
# Test that surface pressure is equal to the
# specified boundary condition (MSLP)
mask_z_0 = z .≈ 0
@test all(p[mask_z_0] .≈ _MSLP)
if profile isa TDTP.DryAdiabaticProfile
@test all(p[mask_z_0] .≈ _p_ref_theta)
else
@test all(p[mask_z_0] .≈ _MSLP)
end

function log_p_over_MSLP(_z)
_, _p = profile(param_set, _z)
Expand Down
7 changes: 5 additions & 2 deletions test/relations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,11 @@ end
# potential temperatures
T = FT(300)
@test TD.liquid_ice_pottemp_given_pressure(param_set, T, _p_ref_theta) === T
@test TD.liquid_ice_pottemp_given_pressure(param_set, T, _p_ref_theta / 10)
T * 10^(_R_d / _cp_d)
@test TD.liquid_ice_pottemp_given_pressure(
param_set,
T,
_p_ref_theta / 10,
) T * 10^(_R_d / _cp_d)
@test TD.liquid_ice_pottemp_given_pressure(
param_set,
T,
Expand Down

0 comments on commit 5282974

Please sign in to comment.