Skip to content

Commit

Permalink
Use dss on Covariant123Vector in hyperdiffusion tendency
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharshakandala committed Sep 18, 2023
1 parent eb8d3d9 commit 87d91cc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/prognostic_equations/hyperdiffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
)
Expand Down Expand Up @@ -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⁰)
Expand Down

0 comments on commit 87d91cc

Please sign in to comment.