Per-layer Coriolis + advection dispatcher. Reads
this%pv_variant and routes to the matching kernel body:
PV_VARIANT_SADOURNY_HK → coriolis_adv_compute_tendencies_hk (Arakawa-Hsu 1990 — wider 3-corner stencil, suppresses the Hollingsworth-Källén instability) PV_VARIANT_SADOURNY_ENERGY → coriolis_adv_compute_tendencies_sadourny_energy (Sadourny 1975 energy-conserving transport form, q·vh — MOM6 SADOURNY75_ENERGY) otherwise → coriolis_adv_compute_tendencies_sadourny (classical Sadourny 1975 enstrophy-conserving + al81)
Callers that want to pin to a specific variant can call
_hk / _sadourny_energy directly; tests do this.
use_state_fluxes (optional, default .false.): consume the
continuity-renormalised ms%mass_flux_*_layer transports in
place of the kernel-internal u·h_face recompute — the MOM6
mass-consistent CorAdCalc. Only the sadourny_energy
transport form honours it (config fail-loud enforces this).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(ocean_metrics_t), | intent(in) | :: | metrics | |||
| type(coriolis_adv_t), | intent(inout) | :: | this | |||
| type(multilayer_state_t), | intent(in) | :: | ms | |||
| real(kind=wp), | intent(in), | optional | :: | u_src(:,:,:) |
Optional velocity/thickness source override (SPEC §4 S3,
|
|
| real(kind=wp), | intent(in), | optional | :: | v_src(:,:,:) |
Optional velocity/thickness source override (SPEC §4 S3,
|
|
| real(kind=wp), | intent(in), | optional | :: | h_src(:,:,:) |
Optional velocity/thickness source override (SPEC §4 S3,
|
|
| logical, | intent(in), | optional | :: | use_state_fluxes |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | usf |
subroutine coriolis_adv_compute_tendencies(grid, metrics, this, ms, u_src, v_src, h_src, & use_state_fluxes) !! Per-layer Coriolis + advection dispatcher. Reads !! `this%pv_variant` and routes to the matching kernel body: !! !! PV_VARIANT_SADOURNY_HK → coriolis_adv_compute_tendencies_hk !! (Arakawa-Hsu 1990 — wider 3-corner stencil, suppresses !! the Hollingsworth-Källén instability) !! PV_VARIANT_SADOURNY_ENERGY → coriolis_adv_compute_tendencies_sadourny_energy !! (Sadourny 1975 energy-conserving transport form, q·vh — !! MOM6 SADOURNY75_ENERGY) !! otherwise → coriolis_adv_compute_tendencies_sadourny !! (classical Sadourny 1975 enstrophy-conserving + al81) !! !! Callers that want to pin to a specific variant can call !! `_hk` / `_sadourny_energy` directly; tests do this. !! !! `use_state_fluxes` (optional, default .false.): consume the !! continuity-renormalised `ms%mass_flux_*_layer` transports in !! place of the kernel-internal `u·h_face` recompute — the MOM6 !! mass-consistent CorAdCalc. Only the `sadourny_energy` !! transport form honours it (config fail-loud enforces this). type(hgrid_t), intent(in) :: grid type(ocean_metrics_t), intent(in) :: metrics type(coriolis_adv_t), intent(inout) :: this type(multilayer_state_t), intent(in) :: ms ! assumed-shape-ok: outer-shim passthrough, resolved to explicit-shape ! dummies in the variant bodies; never indexed here. real(wp), intent(in), optional :: u_src(:, :, :), v_src(:, :, :), h_src(:, :, :) !! Optional velocity/thickness source override (SPEC §4 S3, !! `split_scheme = "pred_corr"`): the driver passes the step !! time-means `ms%u_av_layer` / `v_av_layer` / `h_av_layer` so the !! Coriolis-advection tendency is evaluated on the MOM6 `u_av` !! family, never the prognostic (MOM6's `CorAdCalc(u_av, v_av, !! h_av, ...)`). All three must be !! passed together. Absent ⇒ prognostic arrays, bit-identical. logical, intent(in), optional :: use_state_fluxes logical :: usf usf = .false. if (present(use_state_fluxes)) usf = use_state_fluxes if (present(u_src)) then if (this%pv_variant == PV_VARIANT_SADOURNY_HK) then call coriolis_adv_compute_tendencies_hk(grid, metrics, this, ms, & u_src, v_src, h_src) else if (this%pv_variant == PV_VARIANT_SADOURNY_ENERGY) then call coriolis_adv_compute_tendencies_sadourny_energy(grid, metrics, this, ms, & u_src, v_src, h_src, & use_state_fluxes=usf) else call coriolis_adv_compute_tendencies_sadourny(grid, metrics, this, ms, & u_src, v_src, h_src) end if else if (this%pv_variant == PV_VARIANT_SADOURNY_HK) then call coriolis_adv_compute_tendencies_hk(grid, metrics, this, ms, & ms%u_face_x_layer, ms%v_face_y_layer, ms%h_layer) else if (this%pv_variant == PV_VARIANT_SADOURNY_ENERGY) then call coriolis_adv_compute_tendencies_sadourny_energy(grid, metrics, this, ms, & ms%u_face_x_layer, ms%v_face_y_layer, ms%h_layer, & use_state_fluxes=usf) else call coriolis_adv_compute_tendencies_sadourny(grid, metrics, this, ms, & ms%u_face_x_layer, ms%v_face_y_layer, ms%h_layer) end if end subroutine coriolis_adv_compute_tendencies