Skip to content

Commit

Permalink
fix nh_pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Oct 12, 2023
1 parent baa37f0 commit 3987896
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions config/model_configs/edmfx_bomex_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edmfx_entr_model: "ConstantCoefficient"
edmfx_detr_model: "ConstantCoefficient"
edmfx_sgs_mass_flux: true
edmfx_sgs_diffusive_flux: true
edmfx_nh_pressure: false
edmfx_nh_pressure: true
prognostic_tke: false
moist: "equil"
config: "box"
Expand All @@ -24,7 +24,7 @@ y_elem: 2
z_elem: 60
z_stretch: false
perturb_initstate: false
dt: "1secs"
t_end: "10800secs"
dt: "2secs"
t_end: "3hours"
dt_save_to_disk: "10secs"
toml: [toml/edmfx_box.toml]
8 changes: 4 additions & 4 deletions config/model_configs/edmfx_dycoms_rf01_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edmfx_entr_model: "ConstantCoefficient"
edmfx_detr_model: "ConstantCoefficient"
edmfx_sgs_mass_flux: true
edmfx_sgs_diffusive_flux: true
edmfx_nh_pressure: false
edmfx_nh_pressure: true
prognostic_tke: false
moist: equil
config: box
Expand All @@ -23,7 +23,7 @@ x_elem: 2
y_elem: 2
z_elem: 30
z_stretch: false
dt: 1secs
t_end: 2400secs
dt_save_to_disk: 2secs
dt: 2secs
t_end: 4hours
dt_save_to_disk: 10secs
toml: [toml/edmfx_box.toml]
2 changes: 1 addition & 1 deletion config/model_configs/edmfx_gabls_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edmfx_entr_model: "ConstantCoefficient"
edmfx_detr_model: "ConstantCoefficient"
edmfx_sgs_mass_flux: true
edmfx_sgs_diffusive_flux: true
edmfx_nh_pressure: false
edmfx_nh_pressure: true
prognostic_tke: false
moist: "equil"
config: "box"
Expand Down
2 changes: 1 addition & 1 deletion config/model_configs/edmfx_rico_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edmfx_entr_model: "ConstantCoefficient"
edmfx_detr_model: "ConstantCoefficient"
edmfx_sgs_mass_flux: true
edmfx_sgs_diffusive_flux: true
edmfx_nh_pressure: false
edmfx_nh_pressure: true
prognostic_tke: false
moist: "equil"
#precip_model: "0M"
Expand Down
2 changes: 1 addition & 1 deletion config/model_configs/edmfx_trmm_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edmfx_entr_model: "ConstantCoefficient"
edmfx_detr_model: "ConstantCoefficient"
edmfx_sgs_mass_flux: true
edmfx_sgs_diffusive_flux: true
edmfx_nh_pressure: false
edmfx_nh_pressure: true
prognostic_tke: false
moist: equil
apply_limiter: false
Expand Down
4 changes: 2 additions & 2 deletions src/prognostic_equations/edmfx_closures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ edmfx_nh_pressure_tendency!(Yₜ, Y, p, t, colidx, turbconv_model) = nothing
function edmfx_nh_pressure_tendency!(Yₜ, Y, p, t, colidx, turbconv_model::EDMFX)

n = n_mass_flux_subdomains(turbconv_model)
(; params, ᶜρʲs, ᶜρ_ref, ᶠgradᵥ_ᶜΦ, ᶜuʲs, ᶜu⁰, ᶠu₃⁰) = p
(; params, ᶜρʲs, ᶜρ_ref, ᶜp, ᶜp_ref, ᶠgradᵥ_ᶜΦ, ᶠu₃⁰) = p
FT = eltype(Y)
ᶜz = Fields.coordinate_field(Y.c).z
z_sfc = Fields.level(Fields.coordinate_field(Y.f).z, Fields.half)
Expand Down Expand Up @@ -107,7 +107,7 @@ function edmfx_nh_pressure_tendency!(Yₜ, Y, p, t, colidx, turbconv_model::EDMF
p.atmos.edmfx_nh_pressure,
ᶠlg[colidx],
ᶠbuoyancy(
ᶠinterp(ᶜρ_ref[colidx]),
ᶠinterp(Y.c.ρ[colidx]),
ᶠinterp(ᶜρʲs.:($$j)[colidx]),
ᶠgradᵥ_ᶜΦ[colidx],
),
Expand Down
5 changes: 5 additions & 0 deletions toml/edmfx_box.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ alias = "min_area"
value = 1.0e-3
type = "float"
description = "Minimum area fraction per updraft. Parameter not described in the literature."

[entr_coeff]
alias = "entr_coeff"
value = 0.1
type = "float"

0 comments on commit 3987896

Please sign in to comment.