Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Apr 3, 2024
1 parent 662ab38 commit 271c130
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/model_configs/prognostic_edmfx_bomex_column.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ edmfx_entr_model: "Generalized"
edmfx_detr_model: "Generalized"
edmfx_sgs_mass_flux: false
edmfx_sgs_diffusive_flux: true
vert_diff: "false"
edmfx_nh_pressure: true
edmfx_velocity_relaxation: true
prognostic_tke: true
Expand All @@ -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
2 changes: 2 additions & 0 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,8 @@ function make_plots(
"waup",
"tke",
"lmix",
"bgrad",
"strain",
"arup",
"hus",
"husup",
Expand Down
2 changes: 1 addition & 1 deletion src/cache/precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions src/cache/prognostic_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ 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))
# interior_uₕ = Fields.level(Y.c.uₕ, 1)
# ᶜΔz_surface = Fields.Δz_field(interior_uₕ)
# @. ᶜK_u = eddy_diffusivity_coefficient(
# params.C_E,
# norm(interior_uₕ),
# ᶜΔz_surface / 2,
# ᶜp,
# )
@. ᶜK_h = ᶜK_u / ᶜprandtl_nvec

ρatke_flux_values = Fields.field_values(ρatke_flux)
Expand Down
2 changes: 1 addition & 1 deletion src/initial_conditions/initial_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,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 ? FT(0) : FT(0) #tke(z),
),
)
end
Expand Down
2 changes: 1 addition & 1 deletion src/prognostic_equations/gm_sgs_closures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function smagorinsky_lilly_length(c_smag, N_eff, dz, Pr, ϵ_st)
return N_eff > FT(0) ?
c_smag *
dz *
max(0, 1 - N_eff^2 / Pr / 2 / max(ϵ_st, eps(FT)))^(1 / 4) :
max(0, 1 - N_eff^2 / Pr / 2 / max(ϵ_st, FT(1e-5)))^(1 / 4) :
c_smag * dz
end

Expand Down
3 changes: 3 additions & 0 deletions toml/prognostic_edmfx_bomex.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[C_E]
value = 0.0176

[EDMF_surface_area]
value = 0.1

Expand Down

0 comments on commit 271c130

Please sign in to comment.