Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ᶜT from cache #3311

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cache/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ function build_cache(
ᶜΦ,
ᶠgradᵥ_ᶜΦ = ᶠgradᵥ.(ᶜΦ),
ᶜgradᵥ_ᶠΦ = ᶜgradᵥ.(ᶠΦ),
ᶜT = similar(Y.c, FT),
ᶜf³,
ᶠf¹²,
# Used by diagnostics such as hfres, evspblw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function non_orographic_gravity_wave_tendency!(
::NonOrographyGravityWave,
)
#unpack
(; ᶜT,) = p.core
ᶜT = p.scratch.ᶜtemp_scalar
(; ᶜts) = p.precomputed
(; params) = p
(;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function orographic_gravity_wave_cache(Y, ogw::OrographicGravityWave)
end

function orographic_gravity_wave_tendency!(Yₜ, Y, p, t, ::OrographicGravityWave)
(; ᶜT) = p.core
ᶜT = p.scratch.ᶜtemp_scalar
(; params) = p
(; ᶜts, ᶜp) = p.precomputed
(; ᶜdTdz) = p.orographic_gravity_wave
Expand Down
3 changes: 1 addition & 2 deletions src/parameterized_tendencies/microphysics/precipitation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function compute_precipitation_surface_fluxes!(
p,
precip_model::Microphysics0Moment,
)
(; ᶜT) = p.core
ᶜT = p.scratch.ᶜtemp_scalar
(; ᶜts) = p.precomputed # assume ᶜts has been updated
(; ᶜ3d_rain, ᶜ3d_snow, ᶜS_ρq_tot, ᶜS_ρe_tot) = p.precipitation
(; surface_rain_flux, surface_snow_flux) = p.precipitation
Expand All @@ -147,7 +147,6 @@ function compute_precipitation_surface_fluxes!(
# update surface precipitation fluxes in cache for coupler's use
thermo_params = CAP.thermodynamics_params(p.params)
T_freeze = TD.Parameters.T_freeze(thermo_params)
@. ᶜT = TD.air_temperature(thermo_params, ᶜts)
@. ᶜ3d_rain = ifelse(ᶜT >= T_freeze, ᶜS_ρq_tot, 0)
@. ᶜ3d_snow = ifelse(ᶜT < T_freeze, ᶜS_ρq_tot, 0)
Operators.column_integral_definite!(surface_rain_flux, ᶜ3d_rain)
Expand Down
Loading