Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change edmf entrainment closure #2094

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/default_configs/default_edmf_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ debugging_tc:
entr_coeff:
help: "Entrainment coefficient"
value: 1.0
entr_tau:
help: "Entrainment timescale"
value: 900.0
detr_coeff:
help: "Detrainment coefficient"
value: 0.001
Expand Down
2 changes: 1 addition & 1 deletion src/cache/diagnostic_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function set_diagnostic_edmf_precomputed_quantities!(Y, p, t)
ρʲ_int_level = Fields.field_values(Fields.level(ᶜρʲ, 1))

@. u³ʲ_int_halflevel = CT3(
Geometry.WVector($(FT(0.01)), local_geometry_int_halflevel),
Geometry.WVector($(FT(0)), local_geometry_int_halflevel),
local_geometry_int_halflevel,
)
@. h_totʲ_int_level = sgs_scalar_first_interior_bc(
Expand Down
2 changes: 2 additions & 0 deletions src/parameters/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Base.@kwdef struct ClimaAtmosParameters{FT, TP, RP, IP, MPP, SFP, TCP, SP} <:
turbconv_params::TCP
sponge_params::SP
entr_coeff::FT = 1
entr_tau::FT = 900
detr_coeff::FT = 0.001
# TODO: Figure out a better place for these held-suarez parameters
ΔT_y_dry::FT
Expand Down Expand Up @@ -80,6 +81,7 @@ f(ps::ACAP) = ps.f
Cd(ps::ACAP) = ps.Cd
uh_g(ps::ACAP) = CC.Geometry.UVVector(ps.ug, ps.vg)
entr_coeff(ps::ACAP) = ps.entr_coeff
entr_tau(ps::ACAP) = ps.entr_tau
detr_coeff(ps::ACAP) = ps.detr_coeff
ΔT_y_dry(ps::ACAP) = ps.ΔT_y_dry
ΔT_y_wet(ps::ACAP) = ps.ΔT_y_wet
Expand Down
1 change: 1 addition & 0 deletions src/parameters/create_parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function create_climaatmos_parameter_set(
surfacefluxes_params = surf_flux_params,
turbconv_params = tc_params,
entr_coeff = FTD(parsed_args["entr_coeff"]),
entr_tau = FTD(parsed_args["entr_tau"]),
detr_coeff = FTD(parsed_args["detr_coeff"]),
ΔT_y_dry = FTD(pairs.ΔT_y_dry),
ΔT_y_wet = FTD(pairs.ΔT_y_wet),
Expand Down
3 changes: 2 additions & 1 deletion src/prognostic_equations/edmfx_closures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ function pi_groups_entr_detr(
g = CAP.grav(params)

entr_coeff = CAP.entr_coeff(params)
entr_tau = CAP.entr_tau(params)
detr_coeff = CAP.detr_coeff(params)

turbconv_params = CAP.turbconv_params(params)
Expand Down Expand Up @@ -189,7 +190,7 @@ function pi_groups_entr_detr(
# TODO - Temporary: Switch to Π groups after simple tests are done
# (kinematic, bubble, Bomex)
# and/or we can calibrate things in ClimaAtmos
entr = max(0, min(entr_coeff * ᶜwʲ / (ᶜz - z_sfc), 1 / dt))
entr = max(0, min(1 / entr_tau, 1 / dt))
detr = max(0, min(detr_coeff * ᶜwʲ, 1 / dt))

return (; entr, detr)
Expand Down
Loading