@@ -112,11 +112,10 @@ function horizontal_smagorinsky_lilly_tendency!(Yₜ, Y, p, t, ::SmagorinskyLill
112
112
ᶜρχ = getproperty (Y. c, ρχ_name)
113
113
ᶜρχₜ = getproperty (Yₜ. c, ρχ_name)
114
114
ᶜχ = @. lazy (specific (ᶜρχ, Y. c. ρ))
115
- ᶜρχₜ_diffusion =
116
- @. p. scratch. ᶜtemp_scalar = wdivₕ (Y. c. ρ * ᶜD_smag * gradₕ (ᶜχ))
115
+ ᶜρχₜ_diffusion = @. lazy (wdivₕ (Y. c. ρ * ᶜD_smag * gradₕ (ᶜχ)))
117
116
@. ᶜρχₜ += ᶜρχₜ_diffusion
118
117
# Rain and snow does not affect the mass
119
- if ρχ_name ∉ ( :ρq_rai , :ρq_sno )
118
+ if ρχ_name == :ρq_tot
120
119
@. Yₜ. c. ρ += ᶜρχₜ_diffusion
121
120
end
122
121
end
@@ -128,7 +127,7 @@ import UnrolledUtilities as UU
128
127
129
128
function vertical_smagorinsky_lilly_tendency! (Yₜ, Y, p, t, :: SmagorinskyLilly )
130
129
FT = eltype (Y)
131
- (; sfc_temp_C3, ᶠtemp_scalar, ᶜtemp_scalar ) = p. scratch
130
+ (; sfc_temp_C3, ᶠtemp_scalar) = p. scratch
132
131
(; ᶜτ_smag, ᶠτ_smag, ᶠD_smag, ᶜspecific, ᶜh_tot, sfc_conditions) =
133
132
p. precomputed
134
133
(; ρ_flux_uₕ, ρ_flux_h_tot) = sfc_conditions
@@ -172,7 +171,7 @@ function vertical_smagorinsky_lilly_tendency!(Yₜ, Y, p, t, ::SmagorinskyLilly)
172
171
bottom = Operators. SetValue (C3 (FT (0 ))),
173
172
)
174
173
175
- ᶜ∇ᵥρD∇χₜ = @. ᶜtemp_scalar = ᶜdivᵥ_ρχ (- (ᶠρ * ᶠD_smag * ᶠgradᵥ (ᶜχ)))
174
+ ᶜ∇ᵥρD∇χₜ = @. lazy ( ᶜdivᵥ_ρχ (- (ᶠρ * ᶠD_smag * ᶠgradᵥ (ᶜχ) )))
176
175
@. ᶜρχₜ -= ᶜ∇ᵥρD∇χₜ
177
176
# Rain and snow does not affect the mass
178
177
if ρχ_name == :ρq_tot
0 commit comments