Skip to content

Commit

Permalink
Remove c specific from precomputed quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-kev committed Jan 27, 2025
1 parent 275ad50 commit c5db5ed
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/cache/precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import ClimaCore: Spaces, Fields
precomputed_quantities(Y, atmos)
Allocates and returns the precomputed quantities:
- `ᶜspecific`: the specific quantities on cell centers (for every prognostic
quantity `ρχ`, there is a corresponding specific quantity `χ`)
- `ᶜu`: the covariant velocity on cell centers
- `ᶠu³`: the third component of contravariant velocity on cell faces
- `ᶜK`: the kinetic energy on cell centers
Expand Down Expand Up @@ -45,7 +43,6 @@ function precomputed_quantities(Y, atmos)
fspace = axes(Y.f)
n = n_mass_flux_subdomains(atmos.turbconv_model)
gs_quantities = (;
ᶜspecific = specific_gs.(Y.c),
ᶜu = similar(Y.c, C123{FT}),
ᶠu³ = similar(Y.f, CT3{FT}),
ᶜwₜqₜ = similar(Y.c, Geometry.WVector{FT}),
Expand Down Expand Up @@ -472,10 +469,9 @@ NVTX.@annotate function set_precomputed_quantities!(Y, p, t)
n = n_mass_flux_subdomains(turbconv_model)
thermo_args = (thermo_params, moisture_model)
(; ᶜΦ) = p.core
(; ᶜspecific, ᶜu, ᶠu³, ᶜK, ᶜts, ᶜp) = p.precomputed
(; ᶜu, ᶠu³, ᶜK, ᶜts, ᶜp) = p.precomputed
ᶠuₕ³ = p.scratch.ᶠtemp_CT3

@. ᶜspecific = specific_gs(Y.c)
set_ᶠuₕ³!(ᶠuₕ³, Y)

# TODO: We might want to move this to dss! (and rename dss! to something
Expand All @@ -499,7 +495,7 @@ NVTX.@annotate function set_precomputed_quantities!(Y, p, t)
# @. ᶜK += Y.c.sgs⁰.ρatke / Y.c.ρ
# TODO: We should think more about these increments before we use them.
end
@. ᶜts = ts_gs(thermo_args..., ᶜspecific, ᶜK, ᶜΦ, Y.c.ρ)
@. ᶜts = ts_gs(thermo_args..., specific_gs(Y.c), ᶜK, ᶜΦ, Y.c.ρ)
@. ᶜp = TD.air_pressure(thermo_params, ᶜts)

if turbconv_model isa AbstractEDMF
Expand Down

0 comments on commit c5db5ed

Please sign in to comment.