Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Oct 17, 2023
1 parent dbd6c9e commit bac57de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache/advective_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function set_advective_edmf_precomputed_quantities!(Y, p, ᶠuₕ³, t)
# which in turn introduces an error to ᶠu³ʲ, which then increases
# the error in ᶜρʲ. For now, we will filter ᶜρʲ to fix this. Note
# that this will no longer be necessary after we add diffusion.
@. ᶜρʲ = ifelse(abs(ᶜρʲ - Y.c.ρ) <= 2 * eps(Y.c.ρ), Y.c.ρ, ᶜρʲ)
# @. ᶜρʲ = ifelse(abs(ᶜρʲ - Y.c.ρ) <= 2 * eps(Y.c.ρ), Y.c.ρ, ᶜρʲ)

# EDMFX boundary condition:

Expand Down
2 changes: 2 additions & 0 deletions src/prognostic_equations/hyperdiffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ NVTX.@annotate function hyperdiffusion_tendency!(Yₜ, Y, p, t)
@. Yₜ.f.sgsʲs.:($$j).u₃ +=
κ₄ * ᶠwinterp(ᶜJ * Y.c.ρ, ᶜ∇²uᵥʲs.:($$j))
end
# Note: It is more correct to have ρa inside and outside the divergence
@. Yₜ.c.sgsʲs.:($$j).h_tot -= κ₄ * wdivₕ(gradₕ(ᶜ∇²h_totʲs.:($$j)))
end
end
Expand Down Expand Up @@ -258,6 +259,7 @@ NVTX.@annotate function tracer_hyperdiffusion_tendency!(Yₜ, Y, p, t)

if turbconv_model isa AdvectiveEDMFX
for j in 1:n
# Note: It is more correct to have ρa inside and outside the divergence
@. ᶜ∇²q_totʲs.:($$j) = wdivₕ(gradₕ(Y.c.sgsʲs.:($$j).q_tot))
end
end
Expand Down

0 comments on commit bac57de

Please sign in to comment.