From 66a4ad99d84b0875271791618c6856ee76269ed0 Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:33:06 -0800 Subject: [PATCH] use a_max for diagnostic edmf area filter --- src/prognostic_equations/edmfx_sgs_flux.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/prognostic_equations/edmfx_sgs_flux.jl b/src/prognostic_equations/edmfx_sgs_flux.jl index ad86a03c7b..2b2d8f3057 100644 --- a/src/prognostic_equations/edmfx_sgs_flux.jl +++ b/src/prognostic_equations/edmfx_sgs_flux.jl @@ -103,6 +103,8 @@ function edmfx_sgs_mass_flux_tendency!( turbconv_model::DiagnosticEDMFX, ) + turbconv_params = CAP.turbconv_params(p.params) + a_max = CAP.max_area(turbconv_params) n = n_mass_flux_subdomains(turbconv_model) (; edmfx_sgsflux_upwinding) = p.atmos.numerics (; ᶠu³, ᶜh_tot, ᶜspecific) = p.precomputed @@ -126,7 +128,7 @@ function edmfx_sgs_mass_flux_tendency!( min( min( draft_area(ᶜρaʲs.:($$j)[colidx], ᶜρʲs.:($$j)[colidx]), - FT(0.3), + a_max, ), FT(0.02) / max( Geometry.WVector( @@ -161,7 +163,7 @@ function edmfx_sgs_mass_flux_tendency!( ᶜρaʲs.:($$j)[colidx], ᶜρʲs.:($$j)[colidx], ), - FT(0.3), + a_max, ), FT(0.02) / max( Geometry.WVector(