diff --git a/src/prognostic_equations/edmfx_closures.jl b/src/prognostic_equations/edmfx_closures.jl index e603a78f14c..028166cd86e 100644 --- a/src/prognostic_equations/edmfx_closures.jl +++ b/src/prognostic_equations/edmfx_closures.jl @@ -71,9 +71,10 @@ function ᶠupdraft_nh_pressure( ᶠbuoyʲ, ᶠu3ʲ, ᶠu3⁰, - updraft_top, + plume_height, ) + FT = eltype(params) if !nh_pressure_flag return zero(ᶠu3ʲ) else @@ -86,12 +87,11 @@ function ᶠupdraft_nh_pressure( # Independence of aspect ratio hardcoded: α₂_asp_ratio² = FT(0) H_up_min = CAP.min_updraft_top(turbconv_params) - plume_scale_height = max(updraft_top, H_up_min) # We also used to have advection term here: α_a * w_up * div_w_up return α_b * ᶠbuoyʲ + α_d * (ᶠu3ʲ - ᶠu3⁰) * CC.Geometry._norm(ᶠu3ʲ - ᶠu3⁰, ᶠlg) / - plume_scale_height + max(plume_height, H_up_min) end end @@ -109,39 +109,11 @@ function edmfx_nh_pressure_tendency!( (; params) = p (; ᶠgradᵥ_ᶜΦ) = p.core (; ᶜρʲs, ᶠnh_pressure₃ʲs, ᶠu₃⁰, ᶜupdraft_top) = p.precomputed - FT = eltype(Y) - ᶜz = Fields.coordinate_field(Y.c).z - z_sfc = Fields.level(Fields.coordinate_field(Y.f).z, Fields.half) - z_sfc_data = Fields.field_values(z_sfc[colidx]) ᶠlg = Fields.local_geometry_field(Y.f) - turbconv_params = CAP.turbconv_params(params) - a_min = CAP.min_area(turbconv_params) + scale_height = CAP.R_d(params) * CAP.T_surf_ref(params) / CAP.grav(params) for j in 1:n - - # look for updraft top - ᶜupdraft_top_data = Fields.field_values(ᶜupdraft_top[colidx]) - @. ᶜupdraft_top_data = FT(0) - for level in 1:Spaces.nlevels(axes(ᶜz)) - ρaʲ_lev = Fields.field_values( - Spaces.level(Y.c.sgsʲs.:($j).ρa[colidx], level), - ) - ρʲ_lev = - Fields.field_values(Spaces.level(ᶜρʲs.:($j)[colidx], level)) - ᶜz_lev = Fields.field_values(Spaces.level(ᶜz[colidx], level)) - @. ᶜupdraft_top_data = ifelse( - draft_area(ρaʲ_lev, ρʲ_lev) > a_min, - ᶜz_lev, - ᶜupdraft_top_data, - ) - end - @. ᶜupdraft_top_data = ᶜupdraft_top_data - z_sfc_data - - # There's only one updraft_top per column, so it's - # safe to use at cell centers and cell faces, correct?: - ᶠupdraft_top = Fields.Field(ᶜupdraft_top_data, axes(ᶠu₃⁰[colidx])) - @. ᶠnh_pressure₃ʲs.:($$j)[colidx] = ᶠupdraft_nh_pressure( params, p.atmos.edmfx_nh_pressure, @@ -153,7 +125,7 @@ function edmfx_nh_pressure_tendency!( ), Y.f.sgsʲs.:($$j).u₃[colidx], ᶠu₃⁰[colidx], - ᶠupdraft_top, + scale_height, ) @. Yₜ.f.sgsʲs.:($$j).u₃[colidx] -= ᶠnh_pressure₃ʲs.:($$j)[colidx] diff --git a/toml/prognostic_edmfx_bomex_box.toml b/toml/prognostic_edmfx_bomex_box.toml index 20ffe2d1af4..5be8788fc4e 100644 --- a/toml/prognostic_edmfx_bomex_box.toml +++ b/toml/prognostic_edmfx_bomex_box.toml @@ -36,3 +36,6 @@ value = 1 [max_area_limiter_scale] value = 0 + +[pressure_normalmode_drag_coeff] +value = 40.0 diff --git a/toml/prognostic_edmfx_box.toml b/toml/prognostic_edmfx_box.toml index 7341d979b5a..654a543e810 100644 --- a/toml/prognostic_edmfx_box.toml +++ b/toml/prognostic_edmfx_box.toml @@ -33,3 +33,6 @@ value = 1 [max_area_limiter_scale] value = 0 + +[pressure_normalmode_drag_coeff] +value = 40.0