Skip to content

Commit 477c58c

Browse files
authored
Merge pull request #3908 from CliMA/szy21-patch-1
Update edmfx_entr_detr.jl
2 parents 48b567c + 525fac0 commit 477c58c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/prognostic_equations/edmfx_entr_detr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ function edmfx_entr_detr_tendency!(Yₜ, Y, p, t, turbconv_model::PrognosticEDMF
531531
(; ᶠu₃⁰) = p.precomputed
532532

533533
ᶜmse⁰ = ᶜspecific_env_mse(Y, p)
534+
ᶜq_tot⁰ = ᶜspecific_env_value(Val(:q_tot), Y, p)
535+
534536
if p.atmos.moisture_model isa NonEquilMoistModel &&
535537
p.atmos.microphysics_model isa Microphysics1Moment
536538
ᶜq_liq⁰ = ᶜspecific_env_value(Val(:q_liq), Y, p)
@@ -546,8 +548,6 @@ function edmfx_entr_detr_tendency!(Yₜ, Y, p, t, turbconv_model::PrognosticEDMF
546548
ᶜmseʲ = Y.c.sgsʲs.:($j).mse
547549
ᶜq_totʲ = Y.c.sgsʲs.:($j).q_tot
548550

549-
ᶜq_tot⁰ = ᶜspecific_env_value(Val(:q_tot), Y, p)
550-
551551
@. Yₜ.c.sgsʲs.:($$j).ρa += Y.c.sgsʲs.:($$j).ρa * (ᶜentrʲ - ᶜdetrʲ)
552552

553553
@. Yₜ.c.sgsʲs.:($$j).mse += (ᶜentrʲ .+ ᶜturb_entrʲ) * (ᶜmse⁰ - ᶜmseʲ)

0 commit comments

Comments
 (0)