Skip to content

Commit

Permalink
Update test/relations.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
Yair Cohen and charleskawczynski authored Jun 6, 2022
1 parent dba36a4 commit 3209135
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/relations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -501,13 +501,13 @@ end

# test Clausius Clapeyron relation
ts = PhaseEquil_ρeq.(param_set, ρ, e_int, q_tot)
L_v = TD.latent_heat_vapor(param_set, ts)
L_s = TD.latent_heat_sublim(param_set, ts)
λ = TD.liquid_fraction(param_set, ts)
L = λ * L_v + (1 - λ) * L_s
T = TD.air_temperature(param_set, ts)
L_v = TD.latent_heat_vapor.(param_set, ts)
L_s = TD.latent_heat_sublim.(param_set, ts)
λ = TD.liquid_fraction.(param_set, ts)
L = λ .* L_v .+ (1 .- λ) .* L_s
T = TD.air_temperature.(param_set, ts)
q_vap_sat = TD.vapor_specific_humidity(param_set, ts)
@test TD.∂q_vap_sat_∂T(param_set, ts) - L^2 * q_vap_sat / (R_v * T^2)
@test all(TD.∂q_vap_sat_∂T(param_set, ts) .≈ L .^ 2 .* q_vap_sat ./ (R_v .* T.^2))

# PhaseEquil (freezing)
_T_freeze = FT(ICP.T_freeze(param_set))
Expand Down

0 comments on commit 3209135

Please sign in to comment.