Skip to content

Commit

Permalink
Merge branch 'main' into glw/density-example
Browse files Browse the repository at this point in the history
  • Loading branch information
glwagner authored Jan 24, 2024
2 parents 29b219d + 1701c9a commit 5d1ab4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Thermodynamics"
uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
authors = ["Climate Modeling Alliance"]
version = "0.11.4"
version = "0.11.5"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
2 changes: 1 addition & 1 deletion src/relations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2954,7 +2954,7 @@ Virtual dry static energy, given
T_0::FT = TP.T_0(param_set)
cp_d::FT = TP.cp_d(param_set)
T_virt = virtual_temperature(param_set, ts)
return cp_d * (T_virt - T_0) + e_pot
return cp_d * T_virt + e_pot
end

"""
Expand Down
3 changes: 1 addition & 2 deletions test/relations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ end

e_tot = total_energy.(param_set, ts, e_kin, e_pot)
_cp_d = FT(TP.cp_d(param_set))
_T_0 = FT(TP.T_0(param_set))
@test all(
specific_enthalpy.(param_set, ts) .≈
e_int .+
Expand All @@ -667,7 +666,7 @@ end
)
@test all(
virtual_dry_static_energy.(param_set, ts, e_pot) .≈
_cp_d .* (virtual_temperature.(param_set, ts) .- _T_0) .+ e_pot,
_cp_d .* virtual_temperature.(param_set, ts) .+ e_pot,
)

# PhaseEquil
Expand Down

0 comments on commit 5d1ab4e

Please sign in to comment.