@@ -310,11 +310,27 @@ function set_velocity_at_top!(Y, turbconv_model)
310
310
return nothing
311
311
end
312
312
313
+ """
314
+ compute_ᶜu(ᶜuₕ, ᶠu₃)
315
+ Computes the cell-centered velocity, given
316
+ - `ᶜuₕ` the cell-centered horizontal velocity
317
+ - `ᶠu₃` the cell-face `Covariant3` velocity
318
+ """
319
+ compute_ᶜu (ᶜuₕ, ᶠu₃) = @. lazy (C123 (ᶜuₕ) + ᶜinterp (C123 (ᶠu₃)))
320
+
321
+ """
322
+ compute_ᶠu³(ᶠuₕ³, ᶠu₃)
323
+ Computes the cell-face contravariant velocity, given
324
+ - `ᶠuₕ³` the cell-face horizontal `Contravariant3` velocity
325
+ - `ᶠu₃` the cell-face `Covariant3` velocity
326
+ """
327
+ compute_ᶠu³ (ᶠuₕ³, ᶠu₃) = ᶠuₕ³ + CT3 (ᶠu₃)
328
+
313
329
# This is used to set the grid-scale velocity quantities ᶜu, ᶠu³, ᶜK based on
314
330
# ᶠu₃, and it is also used to set the SGS quantities based on ᶠu₃⁰ and ᶠu₃ʲ.
315
331
function set_velocity_quantities! (ᶜu, ᶠu³, ᶜK, ᶠu₃, ᶜuₕ, ᶠuₕ³)
316
- @. ᶜu = C123 (ᶜuₕ) + ᶜinterp ( C123 ( ᶠu₃) )
317
- @. ᶠu³ = ᶠuₕ³ + CT3 ( ᶠu₃)
332
+ ᶜu . = compute_ᶜu (ᶜuₕ, ᶠu₃)
333
+ ᶠu³ . = compute_ᶠu³ .( ᶠuₕ³, ᶠu₃)
318
334
ᶜK .= compute_kinetic (ᶜuₕ, ᶠu₃)
319
335
return nothing
320
336
end
@@ -451,7 +467,7 @@ NVTX.@annotate function set_implicit_precomputed_quantities!(Y, p, t)
451
467
thermo_args = (thermo_params, moisture_model, precip_model)
452
468
453
469
@. ᶜspecific = specific_gs (Y. c)
454
- @. ᶠuₕ³ = $ compute_ᶠuₕ³ (Y. c. uₕ, Y. c. ρ)
470
+ ᶠuₕ³ . = compute_ᶠuₕ³ (Y. c. uₕ, Y. c. ρ)
455
471
456
472
# TODO : We might want to move this to dss! (and rename dss! to something
457
473
# like enforce_constraints!).
0 commit comments