Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Sep 7, 2023
1 parent 388219e commit c913e3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/cache/diagnostic_edmf_precomputed_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,16 +651,14 @@ function set_diagnostic_edmf_precomputed_quantities!(Y, p, t)
),
)

# TODO: This is not correct with topography or with grid stretching
# TODO: Currently the shear production only includes vertical gradients
ᶠu⁰ = p.ᶠtemp_C123
@. ᶠu⁰ = C123(ᶠinterp(Y.c.uₕ)) + C123(ᶠu³⁰)
∇ᵥuvw = p.ᶜtemp_UVWxUVW
∇ᵥuvw = Geometry.project.(Ref(Geometry.UVWAxis()), ᶜgradᵥ.(UVW.(ᶠu⁰)))
@. ᶜshear² = norm_sqr((∇ᵥuvw + adjoint(∇ᵥuvw)) / 2)
ᶜgradᵥ_ᶠuvw⁰ = p.ᶜtemp_UVWxUVW
ᶜgradᵥ_ᶠuvw⁰ =
Geometry.project.(Ref(Geometry.UVWAxis()), ᶜgradᵥ.(UVW.(ᶠu⁰)))
@. ᶜshear² = norm_sqr((ᶜgradᵥ_ᶠuvw⁰ + adjoint(ᶜgradᵥ_ᶠuvw⁰)) / 2)

# ct3_unit = p.ᶜtemp_CT3
# @. ct3_unit = CT3(Geometry.WVector(FT(1)), ᶜlg)
# @. ᶜshear² = norm_sqr(adjoint(CA.ᶜgradᵥ(ᶠu⁰)) * ct3_unit)
ᶜprandtl_nvec = p.ᶜtemp_scalar
@. ᶜprandtl_nvec = turbulent_prandtl_number(
params,
Expand Down
5 changes: 4 additions & 1 deletion src/cache/temporary_quantities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ function temporary_quantities(atmos, center_space, face_space)
ᶠtemp_CT12ʲs = Fields.Field(NTuple{n, CT12{FT}}, face_space), # ᶠω¹²ʲs
ᶜtemp_C123 = Fields.Field(C123{FT}, center_space), # χ₁₂₃
ᶠtemp_C123 = Fields.Field(C123{FT}, face_space), # χ₁₂₃
ᶜtemp_UVWxUVW = Fields.Field(typeof(UVW(FT(0), FT(0), FT(0)) * UVW(FT(0), FT(0), FT(0))'), center_space), # ∇ᵥuvw
ᶜtemp_UVWxUVW = Fields.Field(
typeof(UVW(FT(0), FT(0), FT(0)) * UVW(FT(0), FT(0), FT(0))'),
center_space,
), # ∇ᵥuvw
# TODO: Remove this hack
sfc_temp_C3 = Fields.Field(C3{FT}, Spaces.level(face_space, half)), # ρ_flux_χ
)
Expand Down

0 comments on commit c913e3b

Please sign in to comment.