From 1ca79e0675822149a76f660bcabab59ea99f5e04 Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:43:17 -0700 Subject: [PATCH] wip --- ...e_equil_55km_nz63_clearsky_progedmf_0M.yml | 36 ++++++++++ .../prognostic_edmfx_bomex_column.yml | 13 ++-- ...prognostic_edmfx_bomex_explicit_column.yml | 39 +++++++++++ post_processing/ci_plots.jl | 19 ++++-- src/cache/precomputed_quantities.jl | 2 +- .../prognostic_edmf_precomputed_quantities.jl | 8 +-- src/initial_conditions/initial_conditions.jl | 9 ++- src/prognostic_equations/edmfx_closures.jl | 56 +++++++++++++++- src/prognostic_equations/edmfx_entr_detr.jl | 66 ++++++++----------- toml/prognostic_edmfx_bomex.toml | 25 ++++++- toml/prognostic_edmfx_bomex_explicit.toml | 62 +++++++++++++++++ 11 files changed, 274 insertions(+), 61 deletions(-) create mode 100644 config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_progedmf_0M.yml create mode 100644 config/model_configs/prognostic_edmfx_bomex_explicit_column.yml create mode 100644 toml/prognostic_edmfx_bomex_explicit.toml diff --git a/config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_progedmf_0M.yml b/config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_progedmf_0M.yml new file mode 100644 index 00000000000..cb9030da975 --- /dev/null +++ b/config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_progedmf_0M.yml @@ -0,0 +1,36 @@ +h_elem: 16 +z_max: 55000.0 +z_elem: 63 +dz_bottom: 30.0 +dz_top: 3000.0 +moist: "equil" +precip_model: "0M" +override_τ_precip: false +rad: "clearsky" +dt_rad: "6hours" +surface_setup: "DefaultMoninObukhov" +turbconv: "prognostic_edmfx" +implicit_diffusion: true +approximate_linear_solve_iters: 2 +max_newton_iters_ode: 3 +prognostic_tke: true +edmfx_upwinding: "first_order" +edmfx_entr_model: "Generalized" +edmfx_detr_model: "Generalized" +edmfx_nh_pressure: true +edmfx_velocity_relaxation: true +edmfx_sgs_mass_flux: false +edmfx_sgs_diffusive_flux: true +rayleigh_sponge: true +dt_save_state_to_disk: "3hours" +dt: "50secs" +t_end: "2days" +job_id: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_progedmf_0M" +toml: [toml/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_progedmf_0M.toml] +diagnostics: + - short_name: [ts, ta, thetaa, ha, pfull, rhoa, ua, va, wa, hur, hus, cl, clw, cli, hussfc, evspsbl] + period: 3hours + - short_name: [arup, waup, taup, thetaaup, haup, husup, hurup, clwup, cliup, waen, taen, thetaaen, haen, husen, huren, clwen, clien, tke] + period: 3hours + - short_name: [entr, detr, lmix, bgrad, strain, edt, evu] + period: 3hours diff --git a/config/model_configs/prognostic_edmfx_bomex_column.yml b/config/model_configs/prognostic_edmfx_bomex_column.yml index 3c842d8acdb..459cba6a2b7 100644 --- a/config/model_configs/prognostic_edmfx_bomex_column.yml +++ b/config/model_configs/prognostic_edmfx_bomex_column.yml @@ -5,25 +5,26 @@ edmf_coriolis: "Bomex" ls_adv: "Bomex" surface_setup: "Bomex" turbconv: "prognostic_edmfx" -implicit_diffusion: true -implicit_sgs_advection: true +implicit_diffusion: false +implicit_sgs_advection: false approximate_linear_solve_iters: 2 max_newton_iters_ode: 3 edmfx_upwinding: first_order -edmfx_entr_model: "Generalized" -edmfx_detr_model: "Generalized" +edmfx_entr_model: "PiGroups" +edmfx_detr_model: "PiGroups" edmfx_sgs_mass_flux: true edmfx_sgs_diffusive_flux: true edmfx_nh_pressure: true edmfx_velocity_relaxation: true prognostic_tke: true +cloud_model: "grid_scale" moist: "equil" config: "column" z_max: 3e3 z_elem: 60 z_stretch: false perturb_initstate: false -dt: "50secs" +dt: "1secs" t_end: "6hours" dt_save_to_disk: "10mins" toml: [toml/prognostic_edmfx_bomex.toml] @@ -34,5 +35,5 @@ diagnostics: period: 10mins - short_name: [arup, waup, taup, thetaaup, haup, husup, hurup, clwup, cliup, waen, taen, thetaaen, haen, husen, huren, clwen, clien, tke] period: 10mins - - short_name: [entr, detr, lmix, bgrad, strain, edt, evu] + - short_name: [entr, detr, lmix, bgrad, strain] period: 10mins diff --git a/config/model_configs/prognostic_edmfx_bomex_explicit_column.yml b/config/model_configs/prognostic_edmfx_bomex_explicit_column.yml new file mode 100644 index 00000000000..459cba6a2b7 --- /dev/null +++ b/config/model_configs/prognostic_edmfx_bomex_explicit_column.yml @@ -0,0 +1,39 @@ +job_id: "prognostic_edmfx_bomex_column" +initial_condition: "Bomex" +subsidence: "Bomex" +edmf_coriolis: "Bomex" +ls_adv: "Bomex" +surface_setup: "Bomex" +turbconv: "prognostic_edmfx" +implicit_diffusion: false +implicit_sgs_advection: false +approximate_linear_solve_iters: 2 +max_newton_iters_ode: 3 +edmfx_upwinding: first_order +edmfx_entr_model: "PiGroups" +edmfx_detr_model: "PiGroups" +edmfx_sgs_mass_flux: true +edmfx_sgs_diffusive_flux: true +edmfx_nh_pressure: true +edmfx_velocity_relaxation: true +prognostic_tke: true +cloud_model: "grid_scale" +moist: "equil" +config: "column" +z_max: 3e3 +z_elem: 60 +z_stretch: false +perturb_initstate: false +dt: "1secs" +t_end: "6hours" +dt_save_to_disk: "10mins" +toml: [toml/prognostic_edmfx_bomex.toml] +netcdf_output_at_levels: true +netcdf_interpolation_num_points: [2, 2, 60] +diagnostics: + - short_name: [ts, ta, thetaa, ha, pfull, rhoa, ua, va, wa, hur, hus, cl, clw, cli, hussfc, evspsbl] + period: 10mins + - short_name: [arup, waup, taup, thetaaup, haup, husup, hurup, clwup, cliup, waen, taen, thetaaen, haen, husen, huren, clwen, clien, tke] + period: 10mins + - short_name: [entr, detr, lmix, bgrad, strain] + period: 10mins diff --git a/post_processing/ci_plots.jl b/post_processing/ci_plots.jl index f072752667e..4a8eb293da1 100644 --- a/post_processing/ci_plots.jl +++ b/post_processing/ci_plots.jl @@ -1040,26 +1040,26 @@ function make_plots( short_names = [ "ua", - "wa", + "va", + "tke", + "lmix", + "bgrad", + "strain", "thetaa", "thetaaup", "ta", "taup", "ha", "haup", + "wa", "waup", - "tke", - "lmix", "arup", "hus", "husup", "hur", "hurup", - "cl", "clw", "clwup", - "cli", - "cliup", precip_names..., ] reduction = "inst" @@ -1081,6 +1081,13 @@ function make_plots( ([slice(v, time = LAST_SNAP) for v in group]...,) for group in var_groups_zt ] + # var_groups_z = [ + # ( + # [ + # ClimaAnalysis.window(v, "time", left = 14400, right = 21600) |> ClimaAnalysis.average_time for v in group + # ]..., + # ) for group in var_groups_zt + # ] tmp_file = make_plots_generic( output_paths, diff --git a/src/cache/precomputed_quantities.jl b/src/cache/precomputed_quantities.jl index c10e25ed743..2f84595108b 100644 --- a/src/cache/precomputed_quantities.jl +++ b/src/cache/precomputed_quantities.jl @@ -38,7 +38,7 @@ function precomputed_quantities(Y, atmos) !(atmos.turbconv_model isa DiagnosticEDMFX) @assert !(atmos.moisture_model isa DryModel) || !(atmos.turbconv_model isa PrognosticEDMFX) - @assert isnothing(atmos.turbconv_model) || isnothing(atmos.vert_diff) + # @assert isnothing(atmos.turbconv_model) || isnothing(atmos.vert_diff) TST = thermo_state_type(atmos.moisture_model, FT) SCT = SurfaceConditions.surface_conditions_type(atmos, FT) cspace = axes(Y.c) diff --git a/src/cache/prognostic_edmf_precomputed_quantities.jl b/src/cache/prognostic_edmf_precomputed_quantities.jl index a00c7fa4d81..5024d40ae5d 100644 --- a/src/cache/prognostic_edmf_precomputed_quantities.jl +++ b/src/cache/prognostic_edmf_precomputed_quantities.jl @@ -182,7 +182,7 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t) ᶜK_h, ρatke_flux, ) = p.precomputed - (; ᶜuʲs, ᶜtsʲs, ᶠu³ʲs, ᶜρʲs, ᶜentrʲs, ᶜdetrʲs) = p.precomputed + (; ᶜuʲs, ᶜtsʲs, ᶠu³ʲs, ᶜρʲs, ᶜentrʲs, ᶜdetrʲs, ᶜtke⁰) = p.precomputed (; ustar, obukhov_length, buoyancy_flux) = p.precomputed.sfc_conditions ᶜz = Fields.coordinate_field(Y.c).z @@ -200,7 +200,6 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t) z_sfc, ᶜp, Y.c.ρ, - buoyancy_flux, draft_area(Y.c.sgsʲs.:($$j).ρa, ᶜρʲs.:($$j)), get_physical_w(ᶜuʲs.:($$j), ᶜlg), TD.relative_humidity(thermo_params, ᶜtsʲs.:($$j)), @@ -208,6 +207,7 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t) get_physical_w(ᶜu, ᶜlg), TD.relative_humidity(thermo_params, ᶜts⁰), FT(0), + max(ᶜtke⁰, 0), p.atmos.edmfx_entr_model, ) @. ᶜentrʲs.:($$j) = limit_entrainment( @@ -224,7 +224,6 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t) z_sfc, ᶜp, Y.c.ρ, - buoyancy_flux, Y.c.sgsʲs.:($$j).ρa, draft_area(Y.c.sgsʲs.:($$j).ρa, ᶜρʲs.:($$j)), get_physical_w(ᶜuʲs.:($$j), ᶜlg), @@ -236,6 +235,7 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t) ᶜentrʲs.:($$j), ᶜvert_div, ᶜmassflux_vert_div, + max(ᶜtke⁰, 0), p.atmos.edmfx_detr_model, ) @. ᶜdetrʲs.:($$j) = limit_detrainment( @@ -303,7 +303,7 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t) turbconv_params = CAP.turbconv_params(params) c_m = CAP.tke_ed_coeff(turbconv_params) - @. ᶜK_u = c_m * ᶜmixing_length * sqrt(max(ᶜtke⁰, 0)) + @. ᶜK_u = max(c_m * ᶜmixing_length * sqrt(max(ᶜtke⁰, 0)), 0) @. ᶜK_h = ᶜK_u / ᶜprandtl_nvec ρatke_flux_values = Fields.field_values(ρatke_flux) diff --git a/src/initial_conditions/initial_conditions.jl b/src/initial_conditions/initial_conditions.jl index fd1f6caa342..19918d3a004 100644 --- a/src/initial_conditions/initial_conditions.jl +++ b/src/initial_conditions/initial_conditions.jl @@ -774,6 +774,13 @@ end The `InitialCondition` described in [Brown2002](@cite), but with a hydrostatically balanced pressure profile. """ + +bomex_tke(::Type{FT}) where {FT} = z -> if (z <= 2500.0) + FT(1) - z / 3000 +else + FT(0) +end + Base.@kwdef struct ARM_SGP <: InitialCondition prognostic_tke::Bool = false end @@ -811,7 +818,7 @@ for IC in (:Soares, :Bomex, :LifeCycleTan2018, :ARM_SGP) ), velocity = Geometry.UVector(u(z)), turbconv_state = EDMFState(; - tke = prognostic_tke ? FT(0) : tke(z), + tke = prognostic_tke ? bomex_tke(FT)(z) : tke(z), ), ) end diff --git a/src/prognostic_equations/edmfx_closures.jl b/src/prognostic_equations/edmfx_closures.jl index 55df94579d8..b47f7de4367 100644 --- a/src/prognostic_equations/edmfx_closures.jl +++ b/src/prognostic_equations/edmfx_closures.jl @@ -110,8 +110,37 @@ function edmfx_nh_pressure_tendency!( ᶠlg = Fields.local_geometry_field(Y.f) scale_height = CAP.R_d(params) * CAP.T_surf_ref(params) / CAP.grav(params) + 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]) + turbconv_params = CAP.turbconv_params(params) + a_min = CAP.min_area(turbconv_params) + ᶜupdraft_top = p.scratch.ᶜtemp_scalar 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, @@ -193,6 +222,7 @@ function mixing_length( # compute the maximum mixing length at height z l_z = ᶜz - z_sfc + l_z = 1000000 # compute the l_W - the wall constraint mixing length # which imposes an upper limit on the size of eddies near the surface @@ -242,14 +272,20 @@ function mixing_length( ) # add limiters + # l = SA.SVector( + # l_N > l_z ? l_z : l_N, + # l_TKE > l_z ? l_z : l_TKE, + # l_W > l_z ? l_z : l_W, + # ) l = SA.SVector( - l_N > l_z ? l_z : l_N, - l_TKE > l_z ? l_z : l_TKE, - l_W > l_z ? l_z : l_W, + (l_N < eps(FT) || l_N > l_z) ? l_z : l_N, + (l_TKE < eps(FT) || l_TKE > l_z) ? l_z : l_TKE, + (l_W < eps(FT) || l_W > l_z) ? l_z : l_W, ) # get soft minimum l_smin = lamb_smooth_minimum(l, smin_ub, smin_rm) l_limited = max(l_smag, min(l_smin, l_z)) + #l_limited = min(200, l_z) return l_limited end @@ -305,11 +341,25 @@ function edmfx_velocity_relaxation_tendency!( n = n_mass_flux_subdomains(turbconv_model) (; dt) = p + (; ᶜK, ᶜh_tot, ᶜspecific) = p.precomputed + ᶜu₃ʲ = p.scratch.ᶜtemp_C3 if p.atmos.edmfx_velocity_relaxation for j in 1:n @. Yₜ.f.sgsʲs.:($$j).u₃[colidx] -= C3(min(Y.f.sgsʲs.:($$j).u₃[colidx].components.data.:1, 0)) / dt + # @. Yₜ.c.sgsʲs.:($$j).ρa[colidx] -= min(Y.c.sgsʲs.:($$j).ρa[colidx], 0) / dt + # @. ᶜu₃ʲ[colidx] = ᶜinterp(Y.f.sgsʲs.:($$j).u₃[colidx]) + # @. Yₜ.c.sgsʲs.:($$j).mse[colidx] -= ifelse( + # ᶜu₃ʲ[colidx].components.data.:1 < 0, + # (Y.c.sgsʲs.:($$j).mse[colidx] - (ᶜh_tot[colidx] - ᶜK[colidx])) / dt, + # 0, + # ) + # @. Yₜ.c.sgsʲs.:($$j).q_tot[colidx] -= ifelse( + # ᶜu₃ʲ[colidx].components.data.:1 < 0, + # (Y.c.sgsʲs.:($$j).q_tot[colidx] - ᶜspecific.q_tot[colidx]) / dt, + # 0, + # ) end end end diff --git a/src/prognostic_equations/edmfx_entr_detr.jl b/src/prognostic_equations/edmfx_entr_detr.jl index 2cf7ccb3c85..2c6b5acaafc 100644 --- a/src/prognostic_equations/edmfx_entr_detr.jl +++ b/src/prognostic_equations/edmfx_entr_detr.jl @@ -2,9 +2,6 @@ ##### EDMF entrainment detrainment ##### -# return a harmonic mean of (a, 1-a) -hm_limiter(a) = 2 * a * (1 - a) - """ Return entrainment rate [1/s]. @@ -25,7 +22,6 @@ function entrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜaʲ::FT, ᶜwʲ::FT, ᶜRHʲ::FT, @@ -33,6 +29,7 @@ function entrainment( ᶜw⁰::FT, ᶜRH⁰::FT, ᶜbuoy⁰::FT, + ᶜtke⁰::FT, ::NoEntrainment, ) where {FT} return FT(0) @@ -44,7 +41,6 @@ function entrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜaʲ::FT, ᶜwʲ::FT, ᶜRHʲ::FT, @@ -52,30 +48,29 @@ function entrainment( ᶜw⁰::FT, ᶜRH⁰::FT, ᶜbuoy⁰::FT, + ᶜtke⁰::FT, ::PiGroupsEntrainment, ) where {FT} if ᶜaʲ <= FT(0) return FT(0) else g = CAP.grav(params) - - # pressure scale height (height where pressure drops by 1/e) ref_H = ᶜp / (ᶜρ * g) - # convective velocity - w_star = get_wstar(buoy_flux_surface) # non-dimensional pi-groups - # TODO - using Π₁ blows things up - Π₁ = - (ᶜz - z_sfc) * (ᶜbuoyʲ - ᶜbuoy⁰) / - ((ᶜwʲ - ᶜw⁰)^2 + w_star^2 + eps(FT)) + Π₁ = (ᶜz - z_sfc) * (ᶜbuoyʲ - ᶜbuoy⁰) / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 100 + Π₂ = ᶜtke⁰ / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 2 Π₃ = sqrt(ᶜaʲ) Π₄ = ᶜRHʲ - ᶜRH⁰ - Π₆ = (ᶜz - z_sfc) / ref_H + Π₅ = (ᶜz - z_sfc) / ref_H + + Π₁ = min(max(Π₁, -1), 1) + Π₂ = min(max(Π₂, -1), 1) entr = - abs(ᶜwʲ) / (ᶜz - z_sfc) * ( - -4.013288 - 0.000968 * Π₁ + 0.356974 * Π₃ - 0.403124 * Π₄ + - 1.503261 * Π₆ + abs(ᶜwʲ - ᶜw⁰) / (ᶜz - z_sfc) * ( + -0.32332 + 4.79372 * Π₁ + 3.98108 * Π₂ - 21.64173 * Π₃ + + 18.395 * Π₄ + + 1.12799 * Π₅ ) return entr @@ -88,7 +83,6 @@ function entrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜaʲ::FT, ᶜwʲ::FT, ᶜRHʲ::FT, @@ -96,6 +90,7 @@ function entrainment( ᶜw⁰::FT, ᶜRH⁰::FT, ᶜbuoy⁰::FT, + ᶜtke⁰::FT, ::GeneralizedEntrainment, ) where {FT} turbconv_params = CAP.turbconv_params(params) @@ -109,7 +104,9 @@ function entrainment( min_area_limiter_scale * exp(-min_area_limiter_power * (max(ᶜaʲ, 0) - a_min)) entr = - entr_inv_tau + entr_coeff * abs(ᶜwʲ) / (ᶜz - z_sfc) + min_area_limiter + entr_inv_tau + + entr_coeff * abs(ᶜwʲ - ᶜw⁰) / (ᶜz - z_sfc) + + min_area_limiter return entr end @@ -134,7 +131,6 @@ function detrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜρaʲ::FT, ᶜaʲ::FT, ᶜwʲ::FT, @@ -146,6 +142,7 @@ function detrainment( ᶜentr::FT, ᶜvert_div::FT, ᶜmassflux_vert_div::FT, + ᶜtke⁰::FT, ::NoDetrainment, ) where {FT} return FT(0) @@ -157,7 +154,6 @@ function detrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜρaʲ::FT, ᶜaʲ::FT, ᶜwʲ::FT, @@ -169,6 +165,7 @@ function detrainment( ᶜentr::FT, ᶜvert_div::FT, ᶜmassflux_vert_div::FT, + ᶜtke⁰::FT, ::PiGroupsDetrainment, ) where {FT} @@ -176,27 +173,21 @@ function detrainment( return FT(0) else g = CAP.grav(params) - turbconv_params = CAP.turbconv_params(params) - ᶜaʲ_max = CAP.max_area(turbconv_params) - - max_area_limiter = FT(0.1) * exp(-10 * (ᶜaʲ_max - ᶜaʲ)) - # pressure scale height (height where pressure drops by 1/e) ref_H = ᶜp / (ᶜρ * g) - # convective velocity - w_star = get_wstar(buoy_flux_surface) # non-dimensional pi-groups - # TODO - using Π₁ blows things up - Π₁ = - (ᶜz - z_sfc) * (ᶜbuoyʲ - ᶜbuoy⁰) / - ((ᶜwʲ - ᶜw⁰)^2 + w_star^2 + eps(FT)) + Π₁ = (ᶜz - z_sfc) * (ᶜbuoyʲ - ᶜbuoy⁰) / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 100 + Π₂ = ᶜtke⁰ / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 2 Π₃ = sqrt(ᶜaʲ) Π₄ = ᶜRHʲ - ᶜRH⁰ - Π₆ = (ᶜz - z_sfc) / ref_H + Π₅ = (ᶜz - z_sfc) / ref_H + + Π₁ = min(max(Π₁, -1), 1) + Π₂ = min(max(Π₂, -1), 1) detr = - abs(ᶜwʲ) * ( - 3.535208 + 0.598496 * Π₁ + 1.583348 * Π₃ + 0.046275 * Π₄ - - 0.344836 * Π₆ + max_area_limiter + -min(ᶜmassflux_vert_div, 0) / ᶜρaʲ * ( + 0.3410 - 0.56153 * Π₁ - 0.53411 * Π₂ + 6.01925 * Π₃ - + 1.47516 * Π₄ - 3.85788 * Π₅ ) return detr end @@ -208,7 +199,6 @@ function detrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜρaʲ::FT, ᶜaʲ::FT, ᶜwʲ::FT, @@ -220,6 +210,7 @@ function detrainment( ᶜentr::FT, ᶜvert_div::FT, ᶜmassflux_vert_div::FT, + ᶜtke⁰::FT, ::GeneralizedDetrainment, ) where {FT} turbconv_params = CAP.turbconv_params(params) @@ -258,7 +249,6 @@ function detrainment( z_sfc::FT, ᶜp::FT, ᶜρ::FT, - buoy_flux_surface::FT, ᶜρaʲ::FT, ᶜaʲ::FT, ᶜwʲ::FT, diff --git a/toml/prognostic_edmfx_bomex.toml b/toml/prognostic_edmfx_bomex.toml index 5be8788fc4e..6c256730fbe 100644 --- a/toml/prognostic_edmfx_bomex.toml +++ b/toml/prognostic_edmfx_bomex.toml @@ -1,3 +1,6 @@ +[C_E] +value = 0.0176 + [EDMF_surface_area] value = 0.1 @@ -5,7 +8,7 @@ value = 0.1 value = 1.0e-5 [EDMF_max_area] -value = 0.7 +value = 0.5 [entr_inv_tau] value = 0.0002 @@ -38,4 +41,22 @@ value = 1 value = 0 [pressure_normalmode_drag_coeff] -value = 40.0 +value = 20.0 + +[pressure_normalmode_buoy_coeff1] +value = 0.857 + +[mixing_length_eddy_viscosity_coefficient] +value = 0.041 + +[mixing_length_diss_coeff] +value = 0.174 + +[mixing_length_static_stab_coeff] +value = 0.292 + +[mixing_length_tke_surf_scale] +value = 9.609 + +[mixing_length_Prandtl_number_0] +value = 0.515 diff --git a/toml/prognostic_edmfx_bomex_explicit.toml b/toml/prognostic_edmfx_bomex_explicit.toml new file mode 100644 index 00000000000..6c256730fbe --- /dev/null +++ b/toml/prognostic_edmfx_bomex_explicit.toml @@ -0,0 +1,62 @@ +[C_E] +value = 0.0176 + +[EDMF_surface_area] +value = 0.1 + +[EDMF_min_area] +value = 1.0e-5 + +[EDMF_max_area] +value = 0.5 + +[entr_inv_tau] +value = 0.0002 + +[entr_coeff] +value = 0.3 + +[min_area_limiter_scale] +value = 0 + +[min_area_limiter_power] +value = 10 + +[detr_inv_tau] +value = 0 + +[detr_coeff] +value = 0 + +[detr_buoy_coeff] +value = 0 + +[detr_vertdiv_coeff] +value = 0 + +[detr_massflux_vertdiv_coeff] +value = 1 + +[max_area_limiter_scale] +value = 0 + +[pressure_normalmode_drag_coeff] +value = 20.0 + +[pressure_normalmode_buoy_coeff1] +value = 0.857 + +[mixing_length_eddy_viscosity_coefficient] +value = 0.041 + +[mixing_length_diss_coeff] +value = 0.174 + +[mixing_length_static_stab_coeff] +value = 0.292 + +[mixing_length_tke_surf_scale] +value = 9.609 + +[mixing_length_Prandtl_number_0] +value = 0.515