Skip to content

Commit bf93c01

Browse files
committed
rename molmass_ratio to Rv_over_Rd
1 parent 8f2ae58 commit bf93c01

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/initial_conditions/initial_conditions.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ function moist_baroclinic_wave_values(z, ϕ, λ, params, perturb, deep_atmospher
686686
T = T_v / (1 + ε * q_tot) # This is the formula used in the paper.
687687

688688
# This is the actual formula, which would be consistent with TD:
689-
# T = T_v * (1 + q_tot) / (1 + q_tot * CAP.molmass_ratio(params))
689+
# T = T_v * (1 + q_tot) / (1 + q_tot * CAP.Rv_over_Rd(params))
690690

691691
return (; T, p, q_tot, u, v)
692692
end
@@ -1221,16 +1221,16 @@ function (initial_condition::TRMM_LBA)(params)
12211221
# in Pressel et al., 2015). Note that the measured profiles are different from the
12221222
# ones required for hydrostatic balance.
12231223
# TODO: Move this to APL.
1224-
molmass_ratio = TD.Parameters.molmass_ratio(thermo_params)
1224+
Rv_over_Rd = TD.Parameters.Rv_over_Rd(thermo_params)
12251225
measured_p = APL.TRMM_LBA_p(FT)
12261226
measured_RH = APL.TRMM_LBA_RH(FT)
12271227
measured_z_values = APL.TRMM_LBA_z(FT)
12281228
measured_q_tot_values = map(measured_z_values) do z
12291229
p_v_sat = TD.saturation_vapor_pressure(thermo_params, T(z), TD.Liquid())
12301230
denominator =
12311231
measured_p(z) - p_v_sat +
1232-
(1 / molmass_ratio) * p_v_sat * measured_RH(z) / 100
1233-
q_v_sat = p_v_sat * (1 / molmass_ratio) / denominator
1232+
(1 / Rv_over_Rd) * p_v_sat * measured_RH(z) / 100
1233+
q_v_sat = p_v_sat * (1 / Rv_over_Rd) / denominator
12341234
return q_v_sat * measured_RH(z) / 100
12351235
end
12361236
q_tot = Intp.extrapolate(

src/parameters/Parameters.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ for var in fieldnames(TD.Parameters.ThermodynamicsParameters)
137137
@eval $var(ps::ACAP) = TD.Parameters.$var(thermodynamics_params(ps))
138138
end
139139
# Thermodynamics derived parameters
140-
for var in [:molmass_ratio, :R_d, :R_v, :e_int_v0, :cp_d, :cv_v, :cv_l, :cv_d]
140+
for var in [:Rv_over_Rd, :R_d, :R_v, :e_int_v0, :cp_d, :cv_v, :cv_l, :cv_d]
141141
@eval $var(ps::ACAP) = TD.Parameters.$var(thermodynamics_params(ps))
142142
end
143143

src/prognostic_equations/eddy_diffusion_closures.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function buoyancy_gradients(
120120
FT = eltype(bg_model)
121121

122122
g = TDP.grav(thermo_params)
123-
molmass_ratio = TDP.molmass_ratio(thermo_params)
123+
Rv_over_Rd = TDP.Rv_over_Rd(thermo_params)
124124
R_d = TDP.R_d(thermo_params)
125125
R_v = TDP.R_v(thermo_params)
126126

@@ -159,7 +159,7 @@ function buoyancy_gradients(
159159
qv_sat = get_qv_sat(thermo_params, bg_model)
160160
∂b∂θli_sat = (
161161
∂b∂θv *
162-
(1 + molmass_ratio * (1 + lh / R_v / t_sat) * qv_sat - qt_sat) /
162+
(1 + Rv_over_Rd * (1 + lh / R_v / t_sat) * qv_sat - qt_sat) /
163163
(1 + lh * lh / cp_m / R_v / t_sat / t_sat * qv_sat)
164164
)
165165
∂b∂qt_sat =

0 commit comments

Comments
 (0)