Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Oct 28, 2023
1 parent 2be380a commit 9bf96d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/cache/diagnostic_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ function set_diagnostic_edmf_precomputed_quantities_do_integral!(Y, p, t)
local_geometry_prev_halflevel,
),
TD.relative_humidity(thermo_params, tsʲ_prev_level),
ᶜphysical_buoyancy(params, ρ_ref_prev_level, ρʲ_prev_level),
ᶜphysical_buoyancy(params, ρ_prev_level, ρʲ_prev_level),
get_physical_w(
_prev_halflevel,
u³_prev_halflevel,
local_geometry_prev_halflevel,
),
TD.relative_humidity(thermo_params, ts_prev_level),
ᶜphysical_buoyancy(params, ρ_ref_prev_level, ρ_prev_level),
FT(0),
dt,
p.atmos.edmfx_entr_model,
)
Expand All @@ -383,13 +383,13 @@ function set_diagnostic_edmf_precomputed_quantities_do_integral!(Y, p, t)
local_geometry_prev_halflevel,
),
TD.relative_humidity(thermo_params, tsʲ_prev_level),
ᶜphysical_buoyancy(params, ρ_ref_prev_level, ρʲ_prev_level),
ᶜphysical_buoyancy(params, ρ_prev_level, ρʲ_prev_level),
get_physical_w(
_prev_halflevel,
u³_prev_halflevel,
local_geometry_prev_halflevel,
),
TD.relative_humidity(thermo_params, ts_prev_level),
ᶜphysical_buoyancy(params, ρ_ref_prev_level, ρ_prev_level),
FT(0),
dt,
p.atmos.edmfx_detr_model,
)
Expand Down
4 changes: 2 additions & 2 deletions src/cache/prognostic_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t)
get_physical_w(ᶜuʲs.:($$j), ᶜlg),
TD.relative_humidity(thermo_params, ᶜtsʲs.:($$j)),
ᶜphysical_buoyancy(params, Y.c.ρ, ᶜρʲs.:($$j)),
get_physical_w(ᶜu, ᶜlg),
get_physical_w(ᶜu, ᶜlg),
TD.relative_humidity(thermo_params, ᶜts⁰),
FT(0),
dt,
Expand All @@ -215,7 +215,7 @@ function set_prognostic_edmf_precomputed_quantities_closures!(Y, p, t)
get_physical_w(ᶜuʲs.:($$j), ᶜlg),
TD.relative_humidity(thermo_params, ᶜtsʲs.:($$j)),
ᶜphysical_buoyancy(params, Y.c.ρ, ᶜρʲs.:($$j)),
get_physical_w(ᶜu, ᶜlg),
get_physical_w(ᶜu, ᶜlg),
TD.relative_humidity(thermo_params, ᶜts⁰),
FT(0),
dt,
Expand Down
7 changes: 1 addition & 6 deletions src/prognostic_equations/advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ NVTX.@annotate function explicit_vertical_advection_tendency!(Yₜ, Y, p, t)
ᶠgradᵥ(ᶜKʲs.:($$j)[colidx])

# TODO: Move this to implicit_vertical_advection_tendency!.
# @. Yₜ.f.sgsʲs.:($$j).u₃[colidx] -=
# (
# ᶠgradᵥ(ᶜp[colidx] - ᶜp_ref[colidx]) +
# ᶠinterp(ᶜρʲs.:($$j)[colidx] - ᶜρ_ref[colidx]) *
# ᶠgradᵥ_ᶜΦ[colidx]
# ) / ᶠinterp(ᶜρʲs.:($$j)[colidx])
# TODO: This assumes grid-mean is in hydrostatic balance
@. Yₜ.f.sgsʲs.:($$j).u₃[colidx] -=
(
ᶠinterp(ᶜρʲs.:($$j)[colidx] - Y.c.ρ[colidx]) *
Expand Down

0 comments on commit 9bf96d0

Please sign in to comment.