The 5-point Boole-quadrature density integrals, through the generic
eos_t handle, that feed the finite-volume pressure-gradient force
(FV_MOM6 variant of rdb_ocean_pressure_force): the in-layer
vertical rule over a PCM / PLM / PPM sub-layer T/S profile
(boole_dpa_intz_layer) and the cross-face rules (boole_dpa_face,
boole_dpa_face_pcm). They are the REFERENCE the per-EOS fast paths
are tested against, and the rule the kernel runs for an EOS without a
twin (the linear EOS).
The sub-layer PLM / PPM edge reconstruction (plm_edges_layer,
ppm_edges_layer, with the linear-exact boundary pair
boundary_edges_linear) and the Wright / Roquet twins of these rules
live in rdb_ocean_pressure_force, next to the kernel that calls
them, so they inline into it.
Algorithm references (cite the PAPER, not other codebases):
* Adcroft, Hallberg & Harrison (2008), Ocean Modelling 24, 1-2 —
analytic finite-volume pressure gradient; the layer-integrated
pressure anomaly dpa and its first moment intz_dpa.
* White, Adcroft & Hallberg (2009), J. Comput. Phys. 228 —
high-order in-layer T/S reconstruction for the density integral.
Why reconstruct: the PCM (layer-mean) density integral is exact only for in-layer-uniform density. On thick, sloped layers the moment error does NOT cancel in the horizontal PGF difference (spurious acceleration); a monotone PLM/PPM sub-layer profile removes it to high order.
Conventions (load-bearing): bottom-up k (k=1 bed, k=nz surface);
within a layer the _t (top) edge is SHALLOWER (toward k+1), the
_b (bottom) edge is DEEPER (toward k). z is surface-relative and
negative below the surface; the Boussinesq hydrostatic pressure
estimate at a sub-point is p = -g*rho0*z = g*rho0*depth.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | PGF_RECON_PLM | = | 1 |
Piecewise-linear sub-layer T/S (two-stage h-weighted slope). |
| integer, | public, | parameter | :: | PGF_RECON_PPM | = | 2 |
Piecewise-parabolic sub-layer T/S (implicit-h4 edges + CW limiter + parabolic s6 integrand). |
| integer, | private, | parameter | :: | N_BOOLE | = | 5 |
Number of evenly-spaced sub-points in the closed Newton-Cotes (Boole, 5th-order) quadrature of the in-layer density anomaly. |
HORIZONTAL (cross-face) Boole quadrature of the layer pressure
increment dpa = g * int rho' dz — the face integral the FV
pressure-gradient contour needs (Adcroft, Hallberg & Harrison
2008 §3; Yung, Hallberg, Adcroft & Morrison 2026 §2.4).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(eos_t), | intent(in) | :: | eos | |||
| real(kind=wp), | intent(in) | :: | rho0 |
Boussinesq reference density used in the pressure estimate. |
||
| real(kind=wp), | intent(in) | :: | rho_ref |
Anomaly reference subtracted from the EOS density. |
||
| real(kind=wp), | intent(in) | :: | e_top_l |
Shallower-interface heights of the layer in the LEFT and RIGHT columns (m, surface-relative, <= 0). |
||
| real(kind=wp), | intent(in) | :: | e_top_r |
Shallower-interface heights of the layer in the LEFT and RIGHT columns (m, surface-relative, <= 0). |
||
| real(kind=wp), | intent(in) | :: | dz_l |
Layer thicknesses in the left / right columns (m, >= 0). |
||
| real(kind=wp), | intent(in) | :: | dz_r |
Layer thicknesses in the left / right columns (m, >= 0). |
||
| real(kind=wp), | intent(in) | :: | t_t_l |
Left column temperature: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | t_b_l |
Left column temperature: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | t_m_l |
Left column temperature: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | t_t_r |
Right column temperature triple. |
||
| real(kind=wp), | intent(in) | :: | t_b_r |
Right column temperature triple. |
||
| real(kind=wp), | intent(in) | :: | t_m_r |
Right column temperature triple. |
||
| real(kind=wp), | intent(in) | :: | s_t_l |
Left column salinity triple. |
||
| real(kind=wp), | intent(in) | :: | s_b_l |
Left column salinity triple. |
||
| real(kind=wp), | intent(in) | :: | s_m_l |
Left column salinity triple. |
||
| real(kind=wp), | intent(in) | :: | s_t_r |
Right column salinity triple. |
||
| real(kind=wp), | intent(in) | :: | s_b_r |
Right column salinity triple. |
||
| real(kind=wp), | intent(in) | :: | s_m_r |
Right column salinity triple. |
||
| real(kind=wp), | intent(in) | :: | dpa_l |
The left / right columns’ own |
||
| real(kind=wp), | intent(in) | :: | dpa_r |
The left / right columns’ own |
||
| logical, | intent(in) | :: | parabolic |
.true. -> the sub-column profiles carry the PPM curvature. |
||
| real(kind=wp), | intent(out) | :: | dpa_face |
Along-face mean of |
The cross-face Boole quadrature of boole_dpa_face for a
CONSTANT-BY-LAYER (PCM) T/S column, with MOM6’s near-bottom
mass-weighting of the interpolated T/S (MOM6
int_density_dz_generic_pcm, intx_dpa).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(eos_t), | intent(in) | :: | eos | |||
| real(kind=wp), | intent(in) | :: | rho0 |
Boussinesq reference density used in the pressure estimate. |
||
| real(kind=wp), | intent(in) | :: | rho_ref |
Anomaly reference subtracted from the EOS density. |
||
| real(kind=wp), | intent(in) | :: | e_top_l |
Height of the SHALLOWER interface of the layer in the left / right column (m, geopotential, negative below the datum). |
||
| real(kind=wp), | intent(in) | :: | e_top_r |
Height of the SHALLOWER interface of the layer in the left / right column (m, geopotential, negative below the datum). |
||
| real(kind=wp), | intent(in) | :: | dz_l |
Layer thicknesses in the left / right columns (m, >= 0). |
||
| real(kind=wp), | intent(in) | :: | dz_r |
Layer thicknesses in the left / right columns (m, >= 0). |
||
| real(kind=wp), | intent(in) | :: | t_l |
Layer-mean temperature / salinity in the left / right column. |
||
| real(kind=wp), | intent(in) | :: | t_r |
Layer-mean temperature / salinity in the left / right column. |
||
| real(kind=wp), | intent(in) | :: | s_l |
Layer-mean temperature / salinity in the left / right column. |
||
| real(kind=wp), | intent(in) | :: | s_r |
Layer-mean temperature / salinity in the left / right column. |
||
| real(kind=wp), | intent(in) | :: | dpa_l |
The columns’ own |
||
| real(kind=wp), | intent(in) | :: | dpa_r |
The columns’ own |
||
| real(kind=wp), | intent(in) | :: | hwt_ll |
MOM6 |
||
| real(kind=wp), | intent(in) | :: | hwt_lr |
MOM6 |
||
| real(kind=wp), | intent(in) | :: | hwt_rr |
MOM6 |
||
| real(kind=wp), | intent(in) | :: | hwt_rl |
MOM6 |
||
| real(kind=wp), | intent(out) | :: | dpa_face |
Along-face mean of |
5-point Boole-quadrature density-anomaly integral over one layer
(Adcroft, Hallberg & Harrison 2008; White, Adcroft & Hallberg
2009). Returns the layer-integrated pressure-anomaly increment
dpa = g * int rho' dz and its first moment (from the layer
TOP edge inward) intz_dpa = 0.5 * g * dz^2 * bracket.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(eos_t), | intent(in) | :: | eos | |||
| real(kind=wp), | intent(in) | :: | rho0 |
Boussinesq reference density used in the pressure estimate. |
||
| real(kind=wp), | intent(in) | :: | rho_ref |
Anomaly reference subtracted from the EOS density. |
||
| real(kind=wp), | intent(in) | :: | e_top |
Surface-relative height of the SHALLOWER interface (<= 0). |
||
| real(kind=wp), | intent(in) | :: | dz |
Layer thickness (m), dz >= 0. Marches down from e_top. |
||
| real(kind=wp), | intent(in) | :: | t_t |
Temperature: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | t_b |
Temperature: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | t_mean |
Temperature: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | s_t |
Salinity: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | s_b |
Salinity: top edge, bottom edge, layer mean. |
||
| real(kind=wp), | intent(in) | :: | s_mean |
Salinity: top edge, bottom edge, layer mean. |
||
| logical, | intent(in) | :: | parabolic |
.true. -> add the PPM curvature (s6/t6) term. |
||
| real(kind=wp), | intent(out) | :: | dpa |
g * int rho’ dz over the layer (Pa). |
||
| real(kind=wp), | intent(out) | :: | intz_dpa |
0.5 * g * dz^2 * bracket (Pa*m), first moment from the top. |