diff --git a/src/cache/edmf_precomputed_quantities.jl b/src/cache/edmf_precomputed_quantities.jl index e368fa58015..740233483f3 100644 --- a/src/cache/edmf_precomputed_quantities.jl +++ b/src/cache/edmf_precomputed_quantities.jl @@ -43,7 +43,17 @@ function set_edmf_precomputed_quantities!(Y, p, ᶠuₕ³, t) @. ᶜspecific⁰ = specific_full_sgs⁰(Y.c, turbconv_model) @. ᶜρa⁰ = ρa⁰(Y.c) - set_sgs_ᶠu₃!(u₃⁰, ᶠu₃⁰, Y, turbconv_model) + + ρaʲs(sgsʲs) = map(sgsʲ -> sgsʲ.ρa, sgsʲs) + u₃ʲs(sgsʲs) = map(sgsʲ -> sgsʲ.u₃, sgsʲs) + @. ᶠu₃⁰ = u₃⁰( + ᶠinterp(ρaʲs(Y.c.sgsʲs)), + u₃ʲs(Y.f.sgsʲs), + ᶠinterp(Y.c.ρ), + Y.f.u₃, + turbconv_model, + ) + set_velocity_quantities!(ᶜu⁰, ᶠu³⁰, ᶜK⁰, ᶠu₃⁰, Y.c.uₕ, ᶠuₕ³) @. ᶜK⁰ += ᶜspecific⁰.tke @. ᶜts⁰ = ts_sgs(thermo_args..., ᶜspecific⁰, ᶜK⁰, ᶜΦ, ᶜp)