From 0dd18648e3da2c651f29f47fdba136fe76ad6a4b Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:12:18 -0800 Subject: [PATCH] remove reference temperature in virtual DSE --- Project.toml | 2 +- src/relations.jl | 2 +- test/relations.jl | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 5932c623..2614947e 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/relations.jl b/src/relations.jl index 92dfc65c..fab8c4e9 100644 --- a/src/relations.jl +++ b/src/relations.jl @@ -2956,7 +2956,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 """ diff --git a/test/relations.jl b/test/relations.jl index 9ba7e8cb..23a133db 100644 --- a/test/relations.jl +++ b/test/relations.jl @@ -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 .+ @@ -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