Skip to content

Commit 432f803

Browse files
committed
add radiation tendency to updraft
1 parent fe5bf0d commit 432f803

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/parameterized_tendencies/radiation/radiation.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,15 @@ end
419419

420420
function radiation_tendency!(Yₜ, Y, p, t, ::RRTMGPI.AbstractRRTMGPMode)
421421
(; ᶠradiation_flux) = p.radiation
422+
(; turbconv_model) = p.atmos
422423
@. Yₜ.c.ρe_tot -= ᶜdivᵥ(ᶠradiation_flux)
424+
if turbconv_model isa PrognosticEDMFX
425+
(; ᶜρʲs) = p.precomputed
426+
n = n_mass_flux_subdomains(turbconv_model)
427+
for j in 1:n
428+
@. Yₜ.c.sgsʲs.:($$j).mse -= ᶜdivᵥ(ᶠradiation_flux) / ᶜρʲs.:($$j)
429+
end
430+
end
423431
return nothing
424432
end
425433

0 commit comments

Comments
 (0)