From 87d91cc37808b34581efdfb1cab8b0739ff57461 Mon Sep 17 00:00:00 2001 From: sriharshakandala Date: Mon, 18 Sep 2023 10:58:28 -0700 Subject: [PATCH] Use dss on Covariant123Vector in hyperdiffusion tendency --- src/prognostic_equations/hyperdiffusion.jl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/prognostic_equations/hyperdiffusion.jl b/src/prognostic_equations/hyperdiffusion.jl index 27d396fd1a7..ce2389c69a2 100644 --- a/src/prognostic_equations/hyperdiffusion.jl +++ b/src/prognostic_equations/hyperdiffusion.jl @@ -14,8 +14,7 @@ function hyperdiffusion_cache(Y, atmos, do_dss) # Grid scale quantities ᶜ∇²u = similar(Y.c, C123{FT}) gs_quantities = (; - ᶜ∇²uₕ = similar(Y.c, C12{FT}), - ᶜ∇²uᵥ = similar(Y.c, C3{FT}), + ᶜ∇²u = similar(Y.c, C123{FT}), ᶜ∇²specific_energy = similar(Y.c, FT), ᶜ∇²specific_tracers = remove_energy_var.(specific_gs.(Y.c)), ) @@ -121,11 +120,7 @@ NVTX.@annotate function hyperdiffusion_tendency!(Yₜ, Y, p, t) # DSS on Grid scale quantities # Need to split the DSS computation here, because our DSS # operations do not accept Covariant123Vector types - @. ᶜ∇²uₕ = C12(ᶜ∇²u) - @. ᶜ∇²uᵥ = C3(ᶜ∇²u) - dss_op!(ᶜ∇²uₕ, buffer.ᶜ∇²uₕ) - dss_op!(ᶜ∇²uᵥ, buffer.ᶜ∇²uᵥ) - @. ᶜ∇²u = C123(ᶜ∇²uₕ) + C123(ᶜ∇²uᵥ) + dss_op!(ᶜ∇²u, buffer.ᶜ∇²u) dss_op!(ᶜ∇²specific_energy, buffer.ᶜ∇²specific_energy) if turbconv_model isa EDMFX && diffuse_tke dss_op!(ᶜ∇²tke⁰, buffer.ᶜ∇²tke⁰)