Skip to content

Commit 5e6f601

Browse files
Explicitly convert
1 parent f309f92 commit 5e6f601

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/cache/precomputed_quantities.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,11 @@ end
284284
function surface_velocity(ᶠu₃, ᶠuₕ³)
285285
assert_eltype(ᶠu₃, Geometry.Covariant3Vector)
286286
assert_eltype(ᶠuₕ³, Geometry.Contravariant3Vector)
287+
ᶠlg = Fields.local_geometry_field(axes(ᶠu₃))
287288
sfc_u₃ = Fields.level(ᶠu₃.components.data.:1, half)
288289
sfc_uₕ³ = Fields.level(ᶠuₕ³.components.data.:1, half)
289290
sfc_g³³ = g³³_field(sfc_u₃)
290-
w₃ = @. lazy(-sfc_uₕ³ / sfc_g³³) # u³ = uₕ³ + w³ = uₕ³ + w₃ * g³³
291-
292-
# sfc_u₃ = Fields.level(ᶠu₃, half)
293-
# sfc_uₕ³ = Fields.level(ᶠuₕ³, half)
294-
# w₃ = @. lazy(-sfc_uₕ³ / sfc_u₃) # are metric terms automatically applied here?
295-
291+
w₃ = @. lazy(-C3(sfc_uₕ³ / sfc_g³³, ᶠlg)) # u³ = uₕ³ + w³ = uₕ³ + w₃ * g³³
296292
assert_eltype(w₃, Geometry.Covariant3Vector)
297293
return w₃
298294
end

0 commit comments

Comments
 (0)