Skip to content

Commit

Permalink
Merge #2013
Browse files Browse the repository at this point in the history
2013: modify some names and comments in edmf r=szy21 a=szy21



Co-authored-by: Zhaoyi Shen <11598433+szy21@users.noreply.github.com>
  • Loading branch information
bors[bot] and szy21 authored Aug 24, 2023
2 parents 17c5a2f + 61f0125 commit ce3a1b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/cache/diagnostic_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,17 @@ function set_diagnostic_edmf_precomputed_quantities!(Y, p, t)
local_geometry_prev_halflevel,
),
TD.relative_humidity(thermo_params, tsʲ_prev_level),
ᶜbuoyancy(params, ρ_ref_prev_level, ρʲ_prev_level),
ᶜphysical_buoyancy(params, ρ_ref_prev_level, ρʲ_prev_level),
get_physical_w(
u³⁰_prev_halflevel,
local_geometry_prev_halflevel,
),
TD.relative_humidity(thermo_params, ts_prev_level),
ᶜbuoyancy(params, ρ_ref_prev_level, ρ_prev_level),
ᶜphysical_buoyancy(params, ρ_ref_prev_level, ρ_prev_level),
dt,
)

# TODO: use updraft top instead of scale height
@. nh_pressureʲ_prev_level = ᶠupdraft_nh_pressure(
params,
p.atmos.edmfx_nh_pressure,
Expand Down Expand Up @@ -588,7 +589,6 @@ function set_diagnostic_edmf_precomputed_quantities!(Y, p, t)
turbconv_params = CAP.turbconv_params(params)
c_m = TCP.tke_ed_coeff(turbconv_params)
@. ᶜK_u = c_m * ᶜmixing_length * sqrt(max(ᶜtke⁰, 0))
# TODO: add Prantdl number
@. ᶜK_h = ᶜK_u / ᶜprandtl_nvec

ρatke_flux_values = Fields.field_values(ρatke_flux)
Expand Down
4 changes: 2 additions & 2 deletions src/cache/edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ function set_edmf_precomputed_quantities!(Y, p, ᶠuₕ³, t)
Y.c.sgsʲs.:($$j).ρa / ᶜρʲs.:($$j),
get_physical_w(ᶜuʲs.:($$j), ᶜlg),
TD.relative_humidity(thermo_params, ᶜtsʲs.:($$j)),
ᶜbuoyancy(params, ᶜρ_ref, ᶜρʲs.:($$j)),
ᶜphysical_buoyancy(params, ᶜρ_ref, ᶜρʲs.:($$j)),
get_physical_w(ᶜu⁰, ᶜlg),
TD.relative_humidity(thermo_params, ᶜts⁰),
ᶜbuoyancy(params, ᶜρ_ref, ᶜρ⁰),
ᶜphysical_buoyancy(params, ᶜρ_ref, ᶜρ⁰),
dt,
)
end
Expand Down
2 changes: 1 addition & 1 deletion src/prognostic_equations/edmfx_closures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ClimaCore.Fields as Fields
"""
Return buoyancy on cell centers.
"""
function ᶜbuoyancy(params, ᶜρ_ref::FT, ᶜρ::FT) where {FT}
function ᶜphysical_buoyancy(params, ᶜρ_ref::FT, ᶜρ::FT) where {FT}
# TODO - replace by ᶜgradᵥᶠΦ when we move to deep atmosphere
g = CAP.grav(params)
return (ᶜρ_ref - ᶜρ) / ᶜρ * g
Expand Down

0 comments on commit ce3a1b0

Please sign in to comment.