Working precision kind parameter and physical constants.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public, | parameter | :: | CP_WATER | = | 4000.0_wp |
Specific heat capacity of seawater (J/(kg·K)). Converts surface heat flux Q_net [W/m²] to kinematic heat flux Q_net/(rho_0·cp) [m·K/s]. |
| real(kind=wp), | public, | parameter | :: | DEG2RAD | = | PI/180.0_wp |
Degrees → radians conversion factor. |
| real(kind=wp), | public, | parameter | :: | DRY_TOLERANCE | = | 1.0e-6_wp |
Minimum depth to consider a cell wet (m) |
| integer, | public, | parameter | :: | FRHAT_ARITHMETIC | = | 0 |
|
| integer, | public, | parameter | :: | FRHAT_HYBRID | = | 1 |
|
| real(kind=wp), | public, | parameter | :: | FROUDE_CAP | = | 10.0_wp |
Maximum Froude number allowed at wet/dry fronts. If |u|/sqrt(g*h) exceeds this, momentum is rescaled. Physical flows rarely exceed Fr=3; Fr=10 is very permissive. |
| real(kind=wp), | public, | parameter | :: | GRAVITY | = | 9.80665_wp |
Gravitational acceleration (m/s^2) |
| real(kind=wp), | public, | parameter | :: | H_DIV_EPS | = | 1.0e-20_wp |
Pure division-safety epsilon (m), far below any physical thickness:
adding it ( |
| real(kind=wp), | public, | parameter | :: | H_VANISHED | = | 1.5e-4_wp |
Dynamic-vanish threshold (m). A layer thinner than this is
dynamically VANISHED — skip / merge into a neighbour, do NOT clamp.
When dividing by Do not hand-roll the test. Tracers are stored as CONTENT
( — with ONE definition of the predicate, of “the concentration of
layer k”, and of the column merge that restores it:
|
| integer, | public, | parameter | :: | KEPS_STAB_CANUTO | = | 2 |
Canuto et al. (2001) Model A second-moment-closure stability functions (rational alpha_M / alpha_N form per Umlauf & Burchard 2003). |
| integer, | public, | parameter | :: | KEPS_STAB_CONSTANT | = | 0 |
Constant c_mu (=0.09) / Pr_t (=1) – standard high-Re k-epsilon (default; bit-identical to the original closure). |
| integer, | public, | parameter | :: | KEPS_STAB_GALPERIN | = | 1 |
Galperin et al. (1988) quasi-equilibrium stratification-aware stability functions (Mellor-Yamada level-2.5 algebraic form). |
| real(kind=wp), | public, | parameter | :: | LAND_DEPTH_THRESHOLD | = | 2.0_wp |
Cell bathymetry depth (m, positive-down) below which an ocean cell
is treated as LAND for surface-forcing masking. Consumed by
|
| real(kind=wp), | public, | parameter | :: | LATENT_HEAT_VAPORIZATION | = | 2.5e6_wp |
Latent heat of vaporization of water (J/kg). A representative near-surface value (2.501e6 at 0 °C, weakly T-dependent). Used by the evaporative latent-heat surface cooling: a net evaporation of E [m/s] withdraws a heat flux ρ_water·E·L_v [W/m²] from the top of the water column as the evaporated mass changes phase. |
| real(kind=wp), | public, | parameter | :: | NH_MIN_DEPTH | = | 1.0e-1_wp |
Minimum depth for non-hydrostatic pressure operations (m). Cells shallower than this are treated as hydrostatic to avoid 1/h singularities in the NH Poisson operator. |
| integer, | public, | parameter | :: | NZ_STACK_MAX | = | 128 |
Maximum vertical layers for per-column stack workspace inside
The requirement is History: 100 -> 256 (2026-06-19), on the belief that the Redi
neutral-diffusion sweep needed Heap-allocated workspace arrays (PPM snapshots, remap snapshots) have no such limit — they are allocated at runtime. |
| real(kind=wp), | public, | parameter | :: | OMEGA_EARTH | = | 7.2921e-5_wp |
Earth angular velocity (rad/s) |
| real(kind=wp), | public, | parameter | :: | PI | = | 4.0_wp*atan(1.0_wp) |
Pi |
| real(kind=wp), | public, | parameter | :: | RAD2DEG | = | 180.0_wp/PI |
Radians → degrees conversion factor. |
| integer, | public, | parameter | :: | REMAP_PCM | = | 1 |
Piecewise constant (0th order, donor cell) |
| integer, | public, | parameter | :: | REMAP_PLM | = | 2 |
Piecewise linear with minmod limiter (1st order) |
| integer, | public, | parameter | :: | REMAP_PPM | = | 3 |
Piecewise parabolic (2nd order, Colella & Woodward) |
| integer, | public, | parameter | :: | REMAP_PPM_H4 | = | 4 |
Piecewise parabolic with non-uniform 4th-order (H4) edge values — thickness-weighted edge estimate (White & Adcroft 2008) feeding the same Colella & Woodward parabola + monotonicity limiter as REMAP_PPM |
| integer, | public, | parameter | :: | REMAP_PQM | = | 5 |
Piecewise quartic (4th-order, PQM_IH4IH3 — White & Adcroft 2008): implicit-h4 edge values + implicit-h3 edge slopes + a quartic per-cell reconstruction with the White & Adcroft monotonicity limiter and a conservative quartic overlap integral. Requires nz >= 5; falls back to REMAP_PPM for thinner columns. Boundary cells are PCM. |
| real(kind=wp), | public, | parameter | :: | RHO_WATER | = | 1035.0_wp |
Seawater density (kg/m^3) |
| real(kind=wp), | public, | parameter | :: | THIN_LAYER_THRESHOLD | = | 1.0e-3_wp |
Below this depth, momentum is zeroed to prevent huge velocities at wet/dry fronts (m) |
| real(kind=wp), | public, | parameter | :: | TWO_PI | = | 8.0_wp*atan(1.0_wp) |
2*Pi |
| integer, | public, | parameter | :: | VCOORD_EULERIAN_Z | = | 0 |
Ignore SSH when forming |
| integer, | public, | parameter | :: | VCOORD_HYCOM | = | 9 |
Hybrid z/isopycnal coordinate (P3, Bleck 2002 / MOM6
|
| integer, | public, | parameter | :: | VCOORD_LAGRANGIAN | = | -1 |
Pure Lagrangian / isopycnal — |
| integer, | public, | parameter | :: | VCOORD_RHO | = | 8 |
Isopycnal coordinate (P2). Layer interfaces are placed on
prescribed potential-density surfaces |
| integer, | public, | parameter | :: | VCOORD_SIGMA | = | 1 |
Pure terrain-following sigma coordinate (default) |
| integer, | public, | parameter | :: | VCOORD_ZSIGMA | = | 2 |
z-sigma hybrid: z-levels in deep/steep, sigma in shallow |
| integer, | public, | parameter | :: | VCOORD_ZSTAR | = | 4 |
z-star “lite” (MOM6-like quasi-horizontal): single global
|
| integer, | public, | parameter | :: | VCOORD_ZSTAR_FULL | = | 5 |
z-star “full” MOM6: per-column |
| integer, | public, | parameter | :: | VCOORD_ZSTAR_SIGMA | = | 6 |
z/sigma hybrid: smoothstep blend from pure sigma in shallow water (H ≤ depth_transition) to z-lite in deep water (H ≥ depth_transition + blend_width). Coastal wet/dry friendliness in shallow zones, SSH-tracking in deep zones |
| integer, | public, | parameter | :: | VCOORD_Z_FIXED | = | 7 |
Fixed-z interfaces with vanishing layers in shallow water.
ALE remap pulls |
| integer, | public, | parameter | :: | wp | = | sp |
Working precision kind parameter (single) |
.true. when the COMPILED NZ_STACK_MAX covers nz layers.
Callers that get .false. must refuse the run — the overflow is
a silent thread-local-storage overrun, not a crash.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nz |
Smallest NZ_STACK_MAX that safely covers a run of nz layers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nz |
Convert an &ocean_bt_nml frhat_scheme namelist string to a
FRHAT_* constant. Unrecognised ⇒ default_code if given,
else FRHAT_ARITHMETIC.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str | |||
| integer, | intent(in), | optional | :: | default_code |