Skip to content

Commit 92b4fdb

Browse files
authored
Merge pull request #3930 from CliMA/zs/updraft_w_viscous_sponge
add viscous sponge to updraft u3
2 parents fe5bf0d + 8c8295f commit 92b4fdb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/prognostic_equations/remaining_tendency.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ NVTX.@annotate function additional_tendency!(Yₜ, Y, p, t)
139139
ᶜuₕ = Y.c.uₕ
140140
ᶠu₃ = Y.f.u₃
141141
ᶜρ = Y.c.ρ
142-
(; radiation_mode, moisture_model, rayleigh_sponge, viscous_sponge) =
143-
p.atmos
142+
(; radiation_mode, moisture_model, turbconv_model) = p.atmos
143+
(; rayleigh_sponge, viscous_sponge) = p.atmos
144144
(; ls_adv, scm_coriolis) = p.atmos
145145
(; params) = p
146146
thermo_params = CAP.thermodynamics_params(params)
@@ -182,6 +182,15 @@ NVTX.@annotate function additional_tendency!(Yₜ, Y, p, t)
182182
end
183183
end
184184

185+
if turbconv_model isa PrognosticEDMFX
186+
n = n_mass_flux_subdomains(turbconv_model)
187+
for j in 1:n
188+
ᶠu₃ʲ = Y.f.sgsʲs.:($j).u₃
189+
vst_u₃ʲ = viscous_sponge_tendency_u₃(ᶠu₃ʲ, viscous_sponge)
190+
@. Yₜ.f.sgsʲs.:($$j).u₃.components.data.:1 += vst_u₃ʲ
191+
end
192+
end
193+
185194
# Held Suarez tendencies
186195
@. Yₜ.c.uₕ += hs_tendency_uₕ
187196
@. Yₜ.c.ρe_tot += hs_tendency_ρe_tot

0 commit comments

Comments
 (0)