Holds variant flags + PV-at-corner workspace for the combined Coriolis + horizontal-momentum-advection kernel. We follow the Sadourny (1975) energy/enstrophy-conserving form, optionally upgraded with the Hollingsworth-Källén-Arakawa correction that removes the spurious “Hollingsworth instability” on C-grids at eddy-resolving resolutions.
The energy-conserving form adds the relative-vorticity flux + KE-gradient advection terms on top of the Coriolis force. For uniform velocity fields zeta=0 and grad(KE)=0, so the kernel reduces to plain Coriolis.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | CORNER_H_CELL_MEAN | = | 0 |
|
| integer, | public, | parameter | :: | CORNER_H_MOM6_AREA | = | 1 |
|
| integer, | public, | parameter | :: | PV_ADV_CENTERED | = | 0 |
2-point corner average (default; bit-identical to pre-F1). |
| integer, | public, | parameter | :: | PV_ADV_INVALID | = | -1 |
Sentinel for an unrecognised string (fail-loud, mirrors
|
| integer, | public, | parameter | :: | PV_ADV_WENO3 | = | 1 |
3rd-order WENO-Z PV reconstruction (MOM6 WENOVI3RD, radius 2). |
| integer, | public, | parameter | :: | PV_ADV_WENO5 | = | 2 |
5th-order WENO-Z PV reconstruction (MOM6 WENOVI5TH, radius 3 => nghost>=4, radius + 1). |
| integer, | public, | parameter | :: | PV_ADV_WENO7 | = | 3 |
7th-order WENO-Z PV reconstruction (MOM6 WENOVI7TH, radius 4 => nghost>=5, radius + 1). |
| integer, | public, | parameter | :: | PV_VARIANT_AL81 | = | 2 |
Arakawa-Lamb 1981 PV-conserving (future; not yet wired). |
| integer, | public, | parameter | :: | PV_VARIANT_INVALID | = | -1 |
Sentinel returned by |
| integer, | public, | parameter | :: | PV_VARIANT_SADOURNY | = | 1 |
Sadourny enstrophy-conserving — the default. |
| integer, | public, | parameter | :: | PV_VARIANT_SADOURNY_ENERGY | = | 4 |
Sadourny 1975 ENERGY-conserving (MOM6’s ENSTRO (ours, default): CAu = 0.5·avg(q_N, q_S) · avg(v_NW, v_NE, v_SW, v_SE) ENERGY (MOM6): CAu = 0.5·[q_N · 0.5·(v_NW + v_NE) + q_S · 0.5·(v_SW + v_SE)] Conserves total kinetic energy; enstrophy form conserves
squared vorticity instead. ENSTRO dissipates v specifically
at asymmetric WBC fronts; ENERGY preserves it (matches MOM6
double_gyre at NK=1 within geostrophy on v). Engaged via
|
| integer, | public, | parameter | :: | PV_VARIANT_SADOURNY_HK | = | 3 |
Sadourny + Arakawa-Hsu (1990) “HK correction” — wider
3-corner stencil; suppresses the Hollingsworth-Källén
instability that biases vanilla Sadourny at eddy-resolving
resolutions. Implemented in
|
| real(kind=wp), | private, | parameter | :: | CORIOLIS_H_MIN_PV | = | 1.0e-12_wp |
Floor for the corner-h divide in the PV construction (shared by the
energy/hk impls and the BOUND_CORIOLIS abs_vort recovery so the
recomputed |
| real(kind=wp), | private, | parameter | :: | PV_VOL_NEGLECT | = | 1.0e-20_wp |
Roundabout analogue of MOM6’s |
| real(kind=wp), | private, | parameter | :: | PV_WENO_EPS_REL | = | 1.0e-20_wp |
MOM6 |
| real(kind=wp), | private, | parameter | :: | PV_WENO_FAC_DEGEN | = | 1.0e40_wp |
Degenerate-stencil nonlinear factor (MOM6’s literal |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | beta | = | 0.0_wp |
Meridional gradient |
|
| logical, | public | :: | bound_coriolis | = | .false. |
MOM6 |
|
| integer, | public | :: | corner_h_variant | = | CORNER_H_CELL_MEAN |
PV corner-thickness construction (energy scheme).
|
|
| real(kind=wp), | public | :: | f_0 | = | 0.0_wp |
f-plane baseline. |
|
| real(kind=wp), | public, | allocatable | :: | f_corner(:,:) |
Coriolis parameter (1/s) at C-grid corners, shape (nx+1, ny+1). |
||
| logical, | public | :: | hk_pair_floor | = | .false. |
Run the |
|
| logical, | public | :: | is_init | = | .false. |
True between |
|
| type(scratch_3d_buffer_t), | public | :: | ke_centre |
Kinetic energy at cell centres for the gradient(KE) form. |
|||
| type(scratch_3d_buffer_t), | public | :: | mass_flux_u |
HK path: u_face_x * h_at_u_face (mass flux per face) at
east faces. Same shape as |
|||
| type(scratch_3d_buffer_t), | public | :: | mass_flux_v |
HK path: v_face_y * h_at_v_face at north faces. Shape
(nx, ny+1, nz). Same usage caveat as |
|||
| logical, | public | :: | no_slip | = | .false. |
Lateral boundary condition at coasts (spec §14 C1).
|
|
| integer, | public | :: | pv_adv_scheme | = | PV_ADV_CENTERED |
PV face-interpolation scheme (orthogonal to |
|
| type(scratch_3d_buffer_t), | public | :: | pv_flux_x |
du/dt at east faces. |
|||
| type(scratch_3d_buffer_t), | public | :: | pv_flux_y |
dv/dt at north faces. |
|||
| integer, | public | :: | pv_variant | = | PV_VARIANT_SADOURNY |
Active PV/Coriolis scheme variant. Defaults to Sadourny;
set to |
|
| type(scratch_3d_buffer_t), | public | :: | q_corner |
Sadourny path: relative vorticity ζ at corners. HK path: per-mass PV q = (f + ζ) / h_at_corner at corners. Both kernels write-then-read this in a single call so the repurposing is safe — they never coexist within one stage. |
|||
| logical, | public | :: | state_fluxes | = | .false. |
|
|
| logical, | public | :: | use_hk_correction | = | .false. |
Convenience flag mirroring |
|
| logical, | public | :: | weno_velocity_smooth | = | .false. |
|
| procedure, public, non_overridable :: bytes => coriolis_adv_bytes | |
| procedure, public, non_overridable :: destroy => coriolis_adv_destroy | |
| procedure, public, non_overridable :: enter_data => coriolis_adv_enter_data | |
| procedure, public, non_overridable :: exit_data => coriolis_adv_exit_data | |
| procedure, public, non_overridable :: init => coriolis_adv_init | |
| procedure, public, non_overridable :: set_beta_plane => coriolis_adv_set_beta_plane |
Translate a namelist string into a PV_ADV_* code. An
unrecognised string returns PV_ADV_INVALID (fail-loud — a typo
must not silently degrade the PV interpolation). weno5/weno7
are implemented; they additionally require nghost >= 4/5
(pv_adv_required_nghost), checked at configure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Translate a namelist string into a PV_VARIANT_* code.
An unrecognised string returns PV_VARIANT_INVALID (PR-6:
fail-loud — a typo must NOT silently degrade to SADOURNY,
which is a materially different conservation law). "al81"
still maps to PV_VARIANT_AL81 (the reservation), but that
code is rejected by pv_variant_is_implemented at configure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Minimum nghost for a PV face-interp scheme: the stencil RADIUS + 1.
weno5 (radius 3) -> 4, weno7 (radius 4) -> 5; centered and weno3
(radius 2) keep the nghost>=2 baseline – one rank has no seam, and
every decomposed run is already floored at nghost>=3 (ocean_halo_init),
which is weno3’s radius + 1 (measured bitwise, 2x2 / 4x1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | code |
.true. for every wired PV face-interpolation scheme: PV_ADV_CENTERED
+ PV_ADV_WENO3/WENO5/WENO7. weno5/weno7 additionally require a
wider halo (pv_adv_required_nghost), checked separately at configure.
PV_ADV_INVALID returns .false. (fail-loud on a typo).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | code |
.true. only for a Coriolis-advection variant that has a real
kernel wired into coriolis_adv_compute_tendencies
(SADOURNY / SADOURNY_HK / SADOURNY_ENERGY). PV_VARIANT_AL81
returns .false. — the constant is reserved but the
Arakawa-Lamb kernel is not yet written, and the AL81 promise
(simultaneous energy + enstrophy conservation) must not be
silently substituted by the enstrophy-only Sadourny kernel.
PV_VARIANT_INVALID also returns .false.. The predicate is
the single gate validate_config consumes (PR-6 fail-loud).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | code |
3rd-order WENO-Z reconstruction of a corner quantity onto the face
between q0 and qp1, upwind-biased on the sign of the advecting
velocity adv_vel (MOM6 weno_three_h_weight_reconstruction).
Blends a central candidate c0 (ideal weight 2/3) with an
upwind-side linear extrapolation c1 (1/3); the WENO-Z nonlinear
factor (1+tau/b)^2 collapses the weight of whichever candidate
straddles a PV front. In smooth flow -> the fixed upwind-biased
3rd-order stencil; across a jump -> the ENO (non-oscillatory)
branch. f-baked absolute vorticity is passed in (rdb’s
vector-invariant form multiplies the result by the thickness-
weighted face velocity, so there is no separate h-divide – the
mass-weighting lives in that velocity, not in a PV*vh product).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | qm1 | |||
| real(kind=wp), | intent(in) | :: | q0 | |||
| real(kind=wp), | intent(in) | :: | qp1 | |||
| real(kind=wp), | intent(in) | :: | qp2 | |||
| real(kind=wp), | intent(in) | :: | adv_vel |
5th-order WENO-Z reconstruction (MOM6 weno_five_h_weight_reconstruction)
of a 6-point corner stencil onto the face between the two central points
q3,q4, upwind-biased on adv_vel. Three 3-point candidates blended by
WENO-Z (ideal weights 3/10, 3/5, 1/10; tau = |b0-b2|). Applied to the
absolute vorticity directly (see weno3_recon). Radius 3 (nghost>=3).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | q1 | |||
| real(kind=wp), | intent(in) | :: | q2 | |||
| real(kind=wp), | intent(in) | :: | q3 | |||
| real(kind=wp), | intent(in) | :: | q4 | |||
| real(kind=wp), | intent(in) | :: | q5 | |||
| real(kind=wp), | intent(in) | :: | q6 | |||
| real(kind=wp), | intent(in) | :: | adv_vel |
7th-order WENO-Z reconstruction (MOM6 weno_seven_h_weight_reconstruction)
of an 8-point corner stencil onto the face between the two central points
q4,q5, upwind-biased on adv_vel. Four 4-point candidates blended by
WENO-Z (ideal weights 4/35, 18/35, 12/35, 1/35; Balsara-Shu smoothness;
tau = |(b0-b3) + 3(b1-b2)|). Applied to the absolute vorticity directly.
Radius 4 (nghost>=4).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | q1 | |||
| real(kind=wp), | intent(in) | :: | q2 | |||
| real(kind=wp), | intent(in) | :: | q3 | |||
| real(kind=wp), | intent(in) | :: | q4 | |||
| real(kind=wp), | intent(in) | :: | q5 | |||
| real(kind=wp), | intent(in) | :: | q6 | |||
| real(kind=wp), | intent(in) | :: | q7 | |||
| real(kind=wp), | intent(in) | :: | q8 | |||
| real(kind=wp), | intent(in) | :: | adv_vel |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c | |||
| real(kind=wp), | intent(in) | :: | d |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c | |||
| real(kind=wp), | intent(in) | :: | d |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c | |||
| real(kind=wp), | intent(in) | :: | d |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in) | :: | c | |||
| real(kind=wp), | intent(in) | :: | d |
Counted allocatable footprint of the Coriolis-advection slot (0 when unallocated). One arr_bytes term per array — add a term here when a new allocatable joins the type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(coriolis_adv_t), | intent(in) | :: | this |
BOUND_CORIOLIS abs_vort recovery: return (f+ζ) at corner (ic,jc)
by multiplying the PV q_val back by the corner thickness Pass 2
divided abs_vort by — recovering (f+ζ) to round-off. Recomputes
the SAME wet-area-weighted 4-cell hm_num/hm_den, then reconstructs
the effective corner thickness with the SAME formula (and floors) the
active corner_h variant used in Pass 2:
cell_mean (default): h_corner = max(hm_num/max(hm_den,H_DIV_EPS),
CORIOLIS_H_MIN_PV); av = q·h_corner.
mom6_area (use_mom6_ch): Pass 2 formed q = abs_vort·hm_den/
(hm_num + PV_VOL_NEGLECT), so the consistent inverse is
av = q·(hm_num + PV_VOL_NEGLECT)/hm_den (hm_den guarded by
H_DIV_EPS for the fully-land corner, where q≡0 ⇒ av≡0 anyway).
Without matching the variant the recovered abs_vort would be slightly
inconsistent with how q was made whenever BOTH bound_coriolis and
corner_h=”mom6_area” are on — visible only in the truly-vanishing-
thickness limit. Chosen over a persistent abs_vort buffer so the
default-off knob costs ZERO memory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ic | |||
| integer, | intent(in) | :: | jc | |||
| integer, | intent(in) | :: | k | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz | |||
| real(kind=wp), | intent(in) | :: | q_val | |||
| real(kind=wp), | intent(in) | :: | h(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | wet_T(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | areaT(nx,ny) | |||
| logical, | intent(in) | :: | use_mom6_ch |
MOM6 fac_fn: the WENO-Z nonlinear factor (1+tau/b)^2, EXACT-clamped
(not an additive epsilon) to a dominant value when the smoothness
indicator b is degenerate (|b| <= eps*tau), so a locally constant
stencil takes over without a 0/0. Shared by weno3/5/7.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | tau | |||
| real(kind=wp), | intent(in) | :: | b |
Corner thickness of the HK PV, recomputed with EXACTLY the Pass 2
formula of coriolis_adv_compute_tendencies_hk (wet-area-weighted
4-cell mean, array-edge clamps, CORIOLIS_H_MIN_PV floor), so the
closed-face branch knows the h_corner each stored q was divided
by without a persistent buffer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ic | |||
| integer, | intent(in) | :: | jc | |||
| integer, | intent(in) | :: | k | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz | |||
| real(kind=wp), | intent(in) | :: | h(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | wet_T(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | areaT(nx,ny) |
One Arakawa-Hsu pair coefficient (q1 + q2 + q3)/12 with each PV
re-evaluated at a corner thickness of at least h_ref/2:
q → q·h_X/(h_ref/2) where h_X < h_ref/2, q unchanged
otherwise (so an inactive floor returns the unfloored sum bit for
bit). h_ref is the larger thickness of the pair’s u- and v-face.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | q1 |
The three corner PVs and the corner thicknesses they carry. |
||
| real(kind=wp), | intent(in) | :: | h1 |
The three corner PVs and the corner thicknesses they carry. |
||
| real(kind=wp), | intent(in) | :: | q2 |
The three corner PVs and the corner thicknesses they carry. |
||
| real(kind=wp), | intent(in) | :: | h2 |
The three corner PVs and the corner thicknesses they carry. |
||
| real(kind=wp), | intent(in) | :: | q3 |
The three corner PVs and the corner thicknesses they carry. |
||
| real(kind=wp), | intent(in) | :: | h3 |
The three corner PVs and the corner thicknesses they carry. |
||
| real(kind=wp), | intent(in) | :: | h_ref |
|
Per-layer forward-Euler velocity update.
no_wait (optional, default .false.): when .true. the apply DC
loops are issued on OpenACC queue 1 and the routine returns WITHOUT
syncing, so a batched caller (run_stage_split velocity-apply chain)
can pipeline the whole additive apply sequence and !$acc wait(1)
ONCE. Default ⇒ self-contained blocking apply (historical, safe for
non-batched callers — e.g. the unsplit run_stage). Not pure
because of the async/wait directives; still functionally pure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(coriolis_adv_t), | intent(in) | :: | this | |||
| type(multilayer_state_t), | intent(inout) | :: | ms | |||
| real(kind=wp), | intent(in) | :: | dt | |||
| logical, | intent(in), | optional | :: | no_wait |
Forward-Euler velocity update from the tendencies the compute step wrote into pv_flux_x / pv_flux_y. u_face_x(i, j) <- u_face_x(i, j) + dt * pv_flux_x(i, j) v_face_y(i, j) <- v_face_y(i, j) + dt * pv_flux_y(i, j) Split-explicit RK2 (Phase 4) wraps a pair of these around an RK2 averaging pass.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(coriolis_adv_t), | intent(in) | :: | this | |||
| type(barotropic_state_t), | intent(inout) | :: | bs | |||
| real(kind=wp), | intent(in) | :: | dt |
Per-layer Coriolis + advection dispatcher. Reads
this%pv_variant and routes to the matching kernel body:
| 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 |
Sadourny (1975) energy-conserving Coriolis + horizontal- momentum-advection form on the barotropic C-grid state:
| 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(barotropic_state_t), | intent(in) | :: | bs |
Public only for the unit-test suite (no production module imports it); ignore when developing production code in other modules. Per-layer PV-conserving Coriolis + horizontal-advection tendency in the Arakawa-Hsu (1990) form (“HK correction”). The wider 3-corner PV stencil at each face suppresses the spurious Hollingsworth-Källén instability that biases the simpler Sadourny 2-corner form at eddy-resolving resolutions.
| 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) | :: | u(grid%nx_total+1,grid%ny_total,ms%nz_ml) |
Face-velocity / thickness source arrays (outer-shim; the
dispatcher forwards either the prognostic components or the
|
||
| real(kind=wp), | intent(in) | :: | v(grid%nx_total,grid%ny_total+1,ms%nz_ml) | |||
| real(kind=wp), | intent(in) | :: | h(grid%nx_total,grid%ny_total,ms%nz_ml) |
Faithful MOM6 SADOURNY75_ENERGY (Sadourny 1975 energy-conserving)
per-layer Coriolis + horizontal-advection tendency. This is the
TRANSPORT form: the absolute-vorticity flux is the potential
vorticity q = (f + ζ)/h_at_corner times the layer MASS TRANSPORT
(vh/uh), so the discrete Coriolis term produces zero net domain
kinetic energy (energy-conserving). The default enstrophy form
(_sadourny, (f+ζ)·v) only matches this under uniform thickness.
| 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) | :: | u(grid%nx_total+1,grid%ny_total,ms%nz_ml) |
Face-velocity / thickness source arrays (outer-shim; the
dispatcher forwards either the prognostic components or the
|
||
| real(kind=wp), | intent(in) | :: | v(grid%nx_total,grid%ny_total+1,ms%nz_ml) | |||
| real(kind=wp), | intent(in) | :: | h(grid%nx_total,grid%ny_total,ms%nz_ml) | |||
| logical, | intent(in), | optional | :: | use_state_fluxes |
Mass-consistent CorAdCalc (MOM6 parity): fill the transport
buffers from |
Per-layer Sadourny Coriolis + advection tendency. Same algorithm as the barotropic counterpart, lifted with a k-axis on every loop. Each k-slice is independent (ζ stencil only reads same-k velocities; KE at centre only reads same-k face values), so the do-concurrent kernels parallelise over (k, j, i) for full GPU occupancy.
| 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) | :: | u(grid%nx_total+1,grid%ny_total,ms%nz_ml) |
Face-velocity / thickness source arrays (outer-shim; the
dispatcher forwards either the prognostic components or the
|
||
| real(kind=wp), | intent(in) | :: | v(grid%nx_total,grid%ny_total+1,ms%nz_ml) | |||
| real(kind=wp), | intent(in) | :: | h(grid%nx_total,grid%ny_total,ms%nz_ml) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(coriolis_adv_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(coriolis_adv_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(coriolis_adv_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(coriolis_adv_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(coriolis_adv_t), | intent(inout) | :: | this |
Allocate the 4 scratch buffers sized at
(nx_face / ny_face / corner, nz). Default nz=1 covers the
barotropic kernel; passing nz_ml sizes them for the
multilayer kernel. Same backward-compatible pattern as
continuity_init.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(coriolis_adv_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid | |||
| integer, | intent(in), | optional | :: | nz_ml |
Populate f_corner with a beta-plane profile
f(y) = f_0 + beta * (y - y_ref)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(coriolis_adv_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid | |||
| real(kind=wp), | intent(in) | :: | f_0 | |||
| real(kind=wp), | intent(in) | :: | beta | |||
| real(kind=wp), | intent(in) | :: | y_ref |