From 2f11b1d1de79f96448cc92e15531d4db5b806aab Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Sun, 22 Oct 2023 14:07:32 -0700 Subject: [PATCH] add minimum diffusion --- src/prognostic_equations/edmfx_sgs_flux.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prognostic_equations/edmfx_sgs_flux.jl b/src/prognostic_equations/edmfx_sgs_flux.jl index d8c574acd3d..4ab3e705fcd 100644 --- a/src/prognostic_equations/edmfx_sgs_flux.jl +++ b/src/prognostic_equations/edmfx_sgs_flux.jl @@ -169,7 +169,7 @@ function edmfx_sgs_diffusive_flux_tendency!( if p.atmos.edmfx_sgs_diffusive_flux # energy ᶠρaK_h = p.ᶠtemp_scalar - @. ᶠρaK_h[colidx] = ᶠinterp(ᶜρa⁰[colidx]) * ᶠinterp(ᶜK_h[colidx]) + @. ᶠρaK_h[colidx] = ᶠinterp(ᶜρa⁰[colidx]) * max(ᶠinterp(ᶜK_h[colidx]), FT(1)) ᶜdivᵥ_ρe_tot = Operators.DivergenceF2C( top = Operators.SetValue(C3(FT(0))), @@ -192,7 +192,7 @@ function edmfx_sgs_diffusive_flux_tendency!( # momentum ᶠρaK_u = p.ᶠtemp_scalar - @. ᶠρaK_u[colidx] = ᶠinterp(ᶜρa⁰[colidx]) * ᶠinterp(ᶜK_u[colidx]) + @. ᶠρaK_u[colidx] = ᶠinterp(ᶜρa⁰[colidx]) * max(ᶠinterp(ᶜK_u[colidx]), FT(1)) ᶠstrain_rate = p.ᶠtemp_UVWxUVW compute_strain_rate_face!(ᶠstrain_rate[colidx], ᶜu⁰[colidx]) @. Yₜ.c.uₕ[colidx] -= C12(