diff --git a/src/cache/cache.jl b/src/cache/cache.jl index 7cc0be92c9..5c954c957a 100644 --- a/src/cache/cache.jl +++ b/src/cache/cache.jl @@ -114,8 +114,10 @@ function build_cache(Y, atmos, params, surface_setup, sim_info) FT = eltype(params) ᶜcoord = Fields.local_geometry_field(Y.c).coordinates + ᶠcoord = Fields.local_geometry_field(Y.f).coordinates grav = FT(CAP.grav(params)) ᶜΦ = grav .* ᶜcoord.z + ᶠΦ = grav .* ᶠcoord.z if atmos.numerics.use_reference_state R_d = FT(CAP.R_d(params)) @@ -168,6 +170,7 @@ function build_cache(Y, atmos, params, surface_setup, sim_info) core = ( ᶜΦ, ᶠgradᵥ_ᶜΦ = ᶠgradᵥ.(ᶜΦ), + ᶜgradᵥ_ᶠΦ = ᶜgradᵥ.(ᶠΦ), ᶜρ_ref, ᶜp_ref, ᶜT = similar(Y.c, FT),