rdb_ocean_pgf_reconstruct Module

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.


Uses

  • module~~rdb_ocean_pgf_reconstruct~~UsesGraph module~rdb_ocean_pgf_reconstruct rdb_ocean_pgf_reconstruct module~rdb_constants rdb_constants module~rdb_ocean_pgf_reconstruct->module~rdb_constants module~rdb_eos rdb_eos module~rdb_ocean_pgf_reconstruct->module~rdb_eos pic_types pic_types module~rdb_constants->pic_types module~rdb_eos->module~rdb_constants module~rdb_grid rdb_grid module~rdb_eos->module~rdb_grid module~rdb_grid->module~rdb_constants

Used by

  • module~~rdb_ocean_pgf_reconstruct~~UsedByGraph module~rdb_ocean_pgf_reconstruct rdb_ocean_pgf_reconstruct module~rdb_ocean_pressure_force rdb_ocean_pressure_force module~rdb_ocean_pressure_force->module~rdb_ocean_pgf_reconstruct module~rdb_barotropic_coupling rdb_barotropic_coupling module~rdb_barotropic_coupling->module~rdb_ocean_pressure_force module~rdb_ocean_bt_budget_probe rdb_ocean_bt_budget_probe module~rdb_ocean_bt_budget_probe->module~rdb_ocean_pressure_force module~rdb_ocean_dyn rdb_ocean_dyn module~rdb_ocean_dyn->module~rdb_ocean_pressure_force module~rdb_ocean_dyn->module~rdb_barotropic_coupling module~rdb_ocean_dyn->module~rdb_ocean_bt_budget_probe module~rdb_ocean_setup rdb_ocean_setup module~rdb_ocean_setup->module~rdb_ocean_pressure_force module~rdb_ocean_setup->module~rdb_ocean_dyn module~rdb_ocean_state rdb_ocean_state module~rdb_ocean_setup->module~rdb_ocean_state module~rdb_ocean_state->module~rdb_ocean_pressure_force module~rdb_ocean_state->module~rdb_ocean_dyn proc~validate_config validate_config proc~validate_config->module~rdb_ocean_pressure_force module~rdb_driver rdb_driver module~rdb_driver->module~rdb_ocean_dyn module~rdb_driver->module~rdb_ocean_state module~rdb_ocean_engine rdb_ocean_engine module~rdb_driver->module~rdb_ocean_engine module~rdb_handle rdb_handle module~rdb_handle->module~rdb_ocean_state module~rdb_handle->module~rdb_ocean_engine module~rdb_ocean_api rdb_ocean_api module~rdb_ocean_api->module~rdb_ocean_dyn module~rdb_ocean_api->module~rdb_handle module~rdb_ocean_diag_derived rdb_ocean_diag_derived module~rdb_ocean_api->module~rdb_ocean_diag_derived module~rdb_ocean_diag_fills rdb_ocean_diag_fills module~rdb_ocean_api->module~rdb_ocean_diag_fills module~rdb_ocean_api->module~rdb_ocean_engine module~rdb_ocean_diag_derived->module~rdb_ocean_state module~rdb_ocean_diag_derived->module~rdb_ocean_diag_fills module~rdb_ocean_diag_fills->module~rdb_ocean_state module~rdb_ocean_engine->module~rdb_ocean_dyn module~rdb_ocean_engine->module~rdb_ocean_setup module~rdb_ocean_engine->module~rdb_ocean_state module~rdb_ocean_engine->module~rdb_ocean_diag_derived module~rdb_ocean_engine->module~rdb_ocean_diag_fills

Variables

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.


Subroutines

public pure subroutine boole_dpa_face(eos, rho0, rho_ref, e_top_l, e_top_r, dz_l, dz_r, t_t_l, t_b_l, t_m_l, t_t_r, t_b_r, t_m_r, s_t_l, s_b_l, s_m_l, s_t_r, s_b_r, s_m_r, dpa_l, dpa_r, parabolic, dpa_face)

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).

Read more…

Arguments

Type IntentOptional 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 g * int rho' dz over the layer (Pa) – the w = 0 / w = 1 end points of the rule.

real(kind=wp), intent(in) :: dpa_r

The left / right columns’ own g * int rho' dz over the layer (Pa) – the w = 0 / w = 1 end points of the rule.

logical, intent(in) :: parabolic

.true. -> the sub-column profiles carry the PPM curvature.

real(kind=wp), intent(out) :: dpa_face

Along-face mean of g * int rho' dz over the layer (Pa).

public pure subroutine boole_dpa_face_pcm(eos, rho0, rho_ref, e_top_l, e_top_r, dz_l, dz_r, t_l, t_r, s_l, s_r, dpa_l, dpa_r, hwt_ll, hwt_lr, hwt_rr, hwt_rl, dpa_face)

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).

Read more…

Arguments

Type IntentOptional 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 g * int rho' dz over the layer (Pa).

real(kind=wp), intent(in) :: dpa_r

The columns’ own g * int rho' dz over the layer (Pa).

real(kind=wp), intent(in) :: hwt_ll

MOM6 hWt_LL/LR/RR/RL mass-weighting fractions.

real(kind=wp), intent(in) :: hwt_lr

MOM6 hWt_LL/LR/RR/RL mass-weighting fractions.

real(kind=wp), intent(in) :: hwt_rr

MOM6 hWt_LL/LR/RR/RL mass-weighting fractions.

real(kind=wp), intent(in) :: hwt_rl

MOM6 hWt_LL/LR/RR/RL mass-weighting fractions.

real(kind=wp), intent(out) :: dpa_face

Along-face mean of g * int rho' dz over the layer (Pa).

public pure subroutine boole_dpa_intz_layer(eos, rho0, rho_ref, e_top, dz, t_t, t_b, t_mean, s_t, s_b, s_mean, parabolic, dpa, intz_dpa)

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.

Read more…

Arguments

Type IntentOptional 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.