Skip to content

Commit 59ae193

Browse files
committed
update thermodynamics functions
1 parent df84868 commit 59ae193

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/cache/cache.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ function build_cache(
135135
p_ref = similar(ᶜz)
136136
q_tot_ref = similar(ᶜz)
137137
cv_m = similar(ᶜz)
138-
R_m = similar(ᶜz)
139138
thermo_params = CAP.thermodynamics_params(params)
140139
decay_scale_height = FT(8000)
141140

@@ -158,15 +157,12 @@ function build_cache(
158157
@. q_tot_ref =
159158
TD.q_vap_from_RH_liquid(thermo_params, p_ref, T_ref, rel_hum_ref)
160159
@. cv_m = TD.cv_m(thermo_params, TD.PhasePartition(q_tot_ref, FT(0), FT(0)))
161-
@. R_m = TD.gas_constant_air(
162-
thermo_params,
163-
TD.PhasePartition(q_tot_ref, FT(0), FT(0)),
164-
)
165160

166161
ᶜh_ref = @. TD.total_specific_enthalpy(
162+
thermo_params,
167163
cv_m * (T_ref - T_0) + grav * ᶜz,
168-
R_m,
169164
T_ref,
165+
TD.PhasePartition(q_tot_ref, FT(0), FT(0)),
170166
)
171167

172168
core = (

src/parameterized_tendencies/microphysics/microphysics_wrappers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function cloud_sources(
6060
) where {FT}
6161

6262
qᵥ = qₜ - qₗ - qᵢ - qᵣ - qₛ
63-
qₛₗ = TD.q_vap_saturation_from_density(
63+
qₛₗ = TD.q_vap_from_p_vap(
6464
thp,
6565
T,
6666
ρ,
@@ -104,7 +104,7 @@ function cloud_sources(
104104

105105
qᵥ = qₜ - qₗ - qᵢ - qᵣ - qₛ
106106

107-
qₛᵢ = TD.q_vap_saturation_from_density(
107+
qₛᵢ = TD.q_vap_from_p_vap(
108108
thp,
109109
T,
110110
ρ,

0 commit comments

Comments
 (0)