ocean_bc_config_t Derived Type

type, public :: ocean_bc_config_t

Boundary-condition configuration read from &ocean_bc_nml. All defaults reproduce a closed-wall run — existing nmls that omit this block are bit-identical to prior behaviour.


Inherited by

type~~ocean_bc_config_t~~InheritedByGraph type~ocean_bc_config_t ocean_bc_config_t type~ocean_config_t ocean_config_t type~ocean_config_t->type~ocean_bc_config_t bc type~config_t config_t type~config_t->type~ocean_config_t ocean type~ocean_handle_t ocean_handle_t type~ocean_handle_t->type~config_t cfg

Components

Type Visibility Attributes Name Initial
character(len=16), public :: east = "wall"
real(kind=wp), public :: east_clamped_eta = 0.0_wp
real(kind=wp), public :: east_clamped_u = 0.0_wp
real(kind=wp), public :: east_ext_u = 0.0_wp

Exterior barotropic u, east (m/s).

real(kind=wp), public :: east_inflow_S = 35.0_wp
real(kind=wp), public :: east_inflow_T = 10.0_wp
integer, public :: east_n_tidal = 0
real(kind=wp), public :: east_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: east_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: east_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
character(len=16), public :: flather_form = "legacy"

“legacy” (default) = v1 Flather (u_ext=0, no interior vel); “full” = half-characteristic form (Flather 1976).

logical, public :: mask_wall_velocity = .true.

Zero the T-cell wet-mask in the ghost cells beyond every solid WALL edge at setup, so the derived C-grid face masks (wet_u/wet_v/wet_q) are 0 at the wall face and the existing per-stage mask_layer_velocities clears the wall-normal velocity (MOM6’s mask-in-the-update; the halo beyond a wall is land). DEFAULT ON (2026-07): a solid wall must carry zero normal velocity; leaving it garbage (flux-masked but nonzero) was a bug. Set .false. to recover the pre-fix legacy answer for a closed-basin run (e.g. to reproduce an old double_gyre baseline exactly). Without it a flat all-wet channel leaves the wall-normal face velocity as unmasked garbage — the wall flux is masked so mass conserves, but the raw v/u at the wall drifts to the maxvel clamp and paints a spurious vorticity band in diagnostics. Only WALL edges are touched: periodic edges keep their wrapped (wet) ghosts, open/OBC edges keep the interior value (OBC override). Default .false. ⇒ wall ghosts untouched ⇒ bit-identical to legacy runs (this also changes the continuity PPM mirror-h at the wall, which is why it must be opt-in).

character(len=16), public :: north = "wall"
real(kind=wp), public :: north_clamped_eta = 0.0_wp
real(kind=wp), public :: north_clamped_v = 0.0_wp
real(kind=wp), public :: north_ext_v = 0.0_wp

Exterior barotropic v, north (m/s).

real(kind=wp), public :: north_inflow_S = 35.0_wp
real(kind=wp), public :: north_inflow_T = 10.0_wp
integer, public :: north_n_tidal = 0
real(kind=wp), public :: north_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: north_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: north_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: nudge_tau_in = 0.0_wp

Inflow nudging timescale (s, Marchesiello et al. 2001). 0 = off.

real(kind=wp), public :: nudge_tau_out = 0.0_wp

Outflow nudging timescale (s). 0 = off.

logical, public :: obc_tidal_nodal = .false.

Apply the 18.6-yr nodal factor f_c + equilibrium/nodal phase (V_c + u_c) to the open-boundary tidal elevation forcing, keeping the interior body tide and the boundary tide phase-consistent (same generator, same shared &ocean_tides_nml reference epoch). Default .false. ⇒ legacy static-phase OBC sum (bit-identical). When .true. the *_tidal_phase becomes a Greenwich phase LAG (subtracted).

real(kind=wp), public :: orlanski_gamma = 1.0_wp

Running-mean weight (0=full running mean, 1=instant; default=1).

real(kind=wp), public :: orlanski_rx_max = 10.0_wp

Clamp on the Orlanski nondimensional phase speed (grid cells / step).

character(len=16), public :: radiation_scheme = "anomaly"

“anomaly” (default) = v1 BT-mean + zero-gradient anomaly. “orlanski” = per-layer implicit-upwind radiation (Orlanski 1976).

real(kind=wp), public :: res_lscale_in = 0.0_wp

Inflow reservoir length scale (m). 0 = instantaneous inflow (T_data applied on inflow unconditionally — same as v1 for inflow direction when feature is active).

real(kind=wp), public :: res_lscale_out = 0.0_wp

Outflow reservoir length scale (m). 0 = feature disabled (v1 sign-switch path unchanged). Non-zero engages the implicit Marchesiello et al. 2001 reservoir on all open-ish edges.

character(len=16), public :: south = "wall"
real(kind=wp), public :: south_clamped_eta = 0.0_wp
real(kind=wp), public :: south_clamped_v = 0.0_wp
real(kind=wp), public :: south_ext_v = 0.0_wp

Exterior barotropic v, south (m/s).

real(kind=wp), public :: south_inflow_S = 35.0_wp
real(kind=wp), public :: south_inflow_T = 10.0_wp
integer, public :: south_n_tidal = 0
real(kind=wp), public :: south_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: south_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: south_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
logical, public :: sponge_relax_tracers = .false.

When .true., extend the sponge relaxation to h_layer + tracers. Default .false. — preserves bit-identity of existing sponge runs.

real(kind=wp), public :: sponge_strength = 0.0_wp

Peak relaxation rate (1/s) at the outer face of the band.

integer, public :: sponge_width = 0

Number of cells in the sponge band. 0 disables the sponge.

character(len=16), public :: west = "wall"

BC type string for the west edge. Recognised: “wall” (default), “open”, “tidal”, “clamped”, “sponge”, “chapman”, “periodic”. “tripolar_fold” is accepted on the NORTH edge only (Murray bipolar cap; requires grid_config=”tripolar” + periodic w/e).

real(kind=wp), public :: west_clamped_eta = 0.0_wp
real(kind=wp), public :: west_clamped_u = 0.0_wp
real(kind=wp), public :: west_ext_u = 0.0_wp

Exterior barotropic u, west (m/s).

real(kind=wp), public :: west_inflow_S = 35.0_wp
real(kind=wp), public :: west_inflow_T = 10.0_wp
integer, public :: west_n_tidal = 0
real(kind=wp), public :: west_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: west_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
real(kind=wp), public :: west_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp

Source Code

   type :: ocean_bc_config_t
      !! Boundary-condition configuration read from `&ocean_bc_nml`.
      !! All defaults reproduce a closed-wall run — existing nmls that
      !! omit this block are bit-identical to prior behaviour.
      character(len=16) :: west = "wall"
         !! BC type string for the west  edge.  Recognised: "wall" (default),
         !! "open", "tidal", "clamped", "sponge", "chapman", "periodic".
         !! "tripolar_fold" is accepted on the NORTH edge only (Murray
         !! bipolar cap; requires grid_config="tripolar" + periodic w/e).
      character(len=16) :: east = "wall"
      character(len=16) :: south = "wall"
      character(len=16) :: north = "wall"

      ! Clamped Dirichlet values — per-edge, all default 0.
      real(wp) :: west_clamped_eta = 0.0_wp
      real(wp) :: east_clamped_eta = 0.0_wp
      real(wp) :: south_clamped_eta = 0.0_wp
      real(wp) :: north_clamped_eta = 0.0_wp
      real(wp) :: west_clamped_u = 0.0_wp
      real(wp) :: east_clamped_u = 0.0_wp
      real(wp) :: south_clamped_v = 0.0_wp
      real(wp) :: north_clamped_v = 0.0_wp

      ! Inflow tracer concentrations (per-edge; used as clamped_tracer
      ! for salinity index 1 and temperature index 2 by default).
      real(wp) :: west_inflow_S = 35.0_wp
      real(wp) :: west_inflow_T = 10.0_wp
      real(wp) :: east_inflow_S = 35.0_wp
      real(wp) :: east_inflow_T = 10.0_wp
      real(wp) :: south_inflow_S = 35.0_wp
      real(wp) :: south_inflow_T = 10.0_wp
      real(wp) :: north_inflow_S = 35.0_wp
      real(wp) :: north_inflow_T = 10.0_wp

      ! Sponge band — single set shared by whichever edge is OBC_SPONGE.
      integer  :: sponge_width = 0
         !! Number of cells in the sponge band.  0 disables the sponge.
      real(wp) :: sponge_strength = 0.0_wp
         !! Peak relaxation rate (1/s) at the outer face of the band.
      logical  :: sponge_relax_tracers = .false.
         !! When .true., extend the sponge relaxation to h_layer + tracers.
         !! Default .false. — preserves bit-identity of existing sponge runs.

      ! Open-edge tracer reservoir (§1, v2).
      real(wp) :: res_lscale_out = 0.0_wp
         !! Outflow reservoir length scale (m).  0 = feature disabled (v1
         !! sign-switch path unchanged).  Non-zero engages the implicit
         !! Marchesiello et al. 2001 reservoir on all open-ish edges.
      real(wp) :: res_lscale_in = 0.0_wp
         !! Inflow reservoir length scale (m).  0 = instantaneous inflow
         !! (T_data applied on inflow unconditionally — same as v1 for inflow
         !! direction when feature is active).

      ! Per-layer Orlanski radiation (§2, v2).
      character(len=16) :: radiation_scheme = "anomaly"
         !! "anomaly" (default) = v1 BT-mean + zero-gradient anomaly.
         !! "orlanski" = per-layer implicit-upwind radiation (Orlanski 1976).
      real(wp) :: orlanski_rx_max = 10.0_wp
         !! Clamp on the Orlanski nondimensional phase speed (grid cells / step).
      real(wp) :: orlanski_gamma = 1.0_wp
         !! Running-mean weight (0=full running mean, 1=instant; default=1).
      real(wp) :: nudge_tau_in = 0.0_wp
         !! Inflow nudging timescale (s, Marchesiello et al. 2001).  0 = off.
      real(wp) :: nudge_tau_out = 0.0_wp
         !! Outflow nudging timescale (s).  0 = off.

      ! Full Flather with exterior velocity (§4, v2).
      character(len=16) :: flather_form = "legacy"
         !! "legacy" (default) = v1 Flather (u_ext=0, no interior vel);
         !! "full"   = half-characteristic form (Flather 1976).
      real(wp) :: west_ext_u = 0.0_wp  !! Exterior barotropic u, west  (m/s).
      real(wp) :: east_ext_u = 0.0_wp  !! Exterior barotropic u, east  (m/s).
      real(wp) :: south_ext_v = 0.0_wp  !! Exterior barotropic v, south (m/s).
      real(wp) :: north_ext_v = 0.0_wp  !! Exterior barotropic v, north (m/s).

      ! Tidal constituents (west edge only in v1 — extend as needed).
      integer  :: west_n_tidal = 0
      real(wp) :: west_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: west_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: west_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
      integer  :: east_n_tidal = 0
      real(wp) :: east_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: east_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: east_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
      integer  :: south_n_tidal = 0
      real(wp) :: south_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: south_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: south_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp
      integer  :: north_n_tidal = 0
      real(wp) :: north_tidal_amp(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: north_tidal_phase(OBC_MAX_TIDAL_CFG) = 0.0_wp
      real(wp) :: north_tidal_omega(OBC_MAX_TIDAL_CFG) = 0.0_wp

      ! Tidal-OBC nodal/astronomical correction (capability C3).
      logical  :: obc_tidal_nodal = .false.
         !! Apply the 18.6-yr nodal factor `f_c` + equilibrium/nodal phase
         !! `(V_c + u_c)` to the open-boundary tidal elevation forcing, keeping
         !! the interior body tide and the boundary tide phase-consistent (same
         !! generator, same shared `&ocean_tides_nml` reference epoch).  Default
         !! .false. ⇒ legacy static-phase OBC sum (bit-identical).  When .true.
         !! the `*_tidal_phase` becomes a Greenwich phase LAG (subtracted).

      ! Solid-wall velocity masking (MOM6-faithful wall-ghost land fill).
      logical  :: mask_wall_velocity = .true.
         !! Zero the T-cell wet-mask in the ghost cells beyond every solid
         !! WALL edge at setup, so the derived C-grid face masks
         !! (`wet_u`/`wet_v`/`wet_q`) are 0 at the wall face and the existing
         !! per-stage `mask_layer_velocities` clears the wall-normal velocity
         !! (MOM6's mask-in-the-update; the halo beyond a wall is land).
         !! DEFAULT ON (2026-07): a solid wall must carry zero normal velocity;
         !! leaving it garbage (flux-masked but nonzero) was a bug. Set
         !! `.false.` to recover the pre-fix legacy answer for a closed-basin
         !! run (e.g. to reproduce an old double_gyre baseline exactly).
         !! Without it a flat all-wet channel leaves the wall-normal face
         !! velocity as unmasked garbage — the wall flux is masked so mass
         !! conserves, but the raw v/u at the wall drifts to the maxvel clamp
         !! and paints a spurious vorticity band in diagnostics.  Only WALL
         !! edges are touched: periodic edges keep their wrapped (wet) ghosts,
         !! open/OBC edges keep the interior value (OBC override).  Default
         !! .false. ⇒ wall ghosts untouched ⇒ bit-identical to legacy runs
         !! (this also changes the continuity PPM mirror-h at the wall, which
         !! is why it must be opt-in).
   end type ocean_bc_config_t