diff --git a/reproducibility_tests/ref_counter.jl b/reproducibility_tests/ref_counter.jl index 9a35ea00d1..31ba48cde6 100644 --- a/reproducibility_tests/ref_counter.jl +++ b/reproducibility_tests/ref_counter.jl @@ -1,4 +1,4 @@ -254 +255 # **README** # @@ -20,6 +20,9 @@ #= +255 +- Add radiation tendency to prognostic edmf updrafts + 254 - Use rayleigh and viscous sponges in the prognostic_edmfx_aquaplanet diff --git a/src/parameterized_tendencies/radiation/radiation.jl b/src/parameterized_tendencies/radiation/radiation.jl index e1d6fd9035..73e213602e 100644 --- a/src/parameterized_tendencies/radiation/radiation.jl +++ b/src/parameterized_tendencies/radiation/radiation.jl @@ -419,7 +419,19 @@ end function radiation_tendency!(Yₜ, Y, p, t, ::RRTMGPI.AbstractRRTMGPMode) (; ᶠradiation_flux) = p.radiation + (; turbconv_model) = p.atmos @. Yₜ.c.ρe_tot -= ᶜdivᵥ(ᶠradiation_flux) + # Apply radiation tendency to updrafts in prognostic EDMF. We use the + # grid-mean radiation as an approximation for updraft radiation. + # Note: Radiation is not applied to updrafts in diagnostic EDMF because updrafts + # are typically absent in the stratosphere where radiation is more important. + if turbconv_model isa PrognosticEDMFX + (; ᶜρʲs) = p.precomputed + n = n_mass_flux_subdomains(turbconv_model) + for j in 1:n + @. Yₜ.c.sgsʲs.:($$j).mse -= ᶜdivᵥ(ᶠradiation_flux) / ᶜρʲs.:($$j) + end + end return nothing end