@@ -35,8 +35,7 @@ function set_smagorinsky_lilly_precomputed_quantities!(Y, p)
3535 grav = CAP. grav (params)
3636 thermo_params = CAP. thermodynamics_params (params)
3737 (; ᶜtemp_UVWxUVW, ᶠtemp_UVWxUVW, ᶜtemp_strain, ᶠtemp_strain) = scratch
38- (; ᶜtemp_scalar, ᶜtemp_scalar_2, ᶠtemp_scalar, ᶜtemp_UVW, ᶠtemp_UVW) =
39- scratch
38+ (; ᶜtemp_scalar, ᶜtemp_scalar_2, ᶠtemp_scalar, ᶜtemp_UVW, ᶠtemp_UVW) = scratch
4039
4140 ∇ᵥuvw_boundary = Geometry. outer (Geometry. WVector (0 ), UVW (0 , 0 , 0 ))
4241 ᶠgradᵥ_uvw = Operators. GradientC2F (
@@ -63,8 +62,7 @@ function set_smagorinsky_lilly_precomputed_quantities!(Y, p)
6362
6463 # Stratification correction
6564 ᶜθ_v = @. ᶜtemp_scalar = TD. virtual_pottemp (thermo_params, ᶜts)
66- ᶜ∇ᵥθ = @. ᶜtemp_scalar_2 =
67- Geometry. WVector (ᶜgradᵥ (ᶠinterp (ᶜθ_v))). components. data.:1
65+ ᶜ∇ᵥθ = @. ᶜtemp_scalar_2 = Geometry. WVector (ᶜgradᵥ (ᶠinterp (ᶜθ_v))). components. data.:1
6866 ᶜN² = @. ᶜtemp_scalar = grav / ᶜθ_v * ᶜ∇ᵥθ
6967 ᶜS_norm = @. ᶜtemp_scalar_2 = √ (2 * CA. norm_sqr (ᶜS))
7068
@@ -106,11 +104,7 @@ function horizontal_smagorinsky_lilly_tendency!(Yₜ, Y, p, t, ::SmagorinskyLill
106104
107105 # # Total energy tendency
108106 ᶜh_tot = @. lazy (
109- TD. total_specific_enthalpy (
110- thermo_params,
111- ᶜts,
112- specific (Y. c. ρe_tot, Y. c. ρ),
113- ),
107+ TD. total_specific_enthalpy (thermo_params, ᶜts, specific (Y. c. ρe_tot, Y. c. ρ)),
114108 )
115109 @. Yₜ. c. ρe_tot += wdivₕ (Y. c. ρ * ᶜD_smag * gradₕ (ᶜh_tot))
116110
@@ -163,11 +157,7 @@ function vertical_smagorinsky_lilly_tendency!(Yₜ, Y, p, t, ::SmagorinskyLilly)
163157
164158 # # Total energy tendency
165159 ᶜh_tot = @. lazy (
166- TD. total_specific_enthalpy (
167- thermo_params,
168- ᶜts,
169- specific (Y. c. ρe_tot, Y. c. ρ),
170- ),
160+ TD. total_specific_enthalpy (thermo_params, ᶜts, specific (Y. c. ρe_tot, Y. c. ρ)),
171161 )
172162 @. Yₜ. c. ρe_tot -= ᶜdivᵥ_ρe_tot (- (ᶠρ * ᶠD_smag * ᶠgradᵥ (ᶜh_tot)))
173163
@@ -178,8 +168,7 @@ function vertical_smagorinsky_lilly_tendency!(Yₜ, Y, p, t, ::SmagorinskyLilly)
178168 )
179169
180170 foreach_gs_tracer (Yₜ, Y) do ᶜρχₜ, ᶜρχ, ρχ_name
181- ᶜ∇ᵥρD∇χₜ =
182- @. lazy (ᶜdivᵥ_ρχ (- (ᶠρ * ᶠD_smag * ᶠgradᵥ (specific (ᶜρχ, Y. c. ρ)))))
171+ ᶜ∇ᵥρD∇χₜ = @. lazy (ᶜdivᵥ_ρχ (- (ᶠρ * ᶠD_smag * ᶠgradᵥ (specific (ᶜρχ, Y. c. ρ)))))
183172 @. ᶜρχₜ -= ᶜ∇ᵥρD∇χₜ
184173 # Rain and snow does not affect the mass
185174 if ρχ_name == @name (ρq_tot)
0 commit comments