ocean_sponge_config_t Derived Type

type, public :: ocean_sponge_config_t

&ocean_sponge_nml: the map-driven sponge (PR-23). Default OFF (enable = .false.) ⇒ the legacy &ocean_bc_nml band kernels run unchanged ⇒ bit-identical. See rdb_ocean_sponge.F90’s module docstring for the physics; docs/plans/PLAN_PR23_real_sponge.md for the design record.


Inherited by

type~~ocean_sponge_config_t~~InheritedByGraph type~ocean_sponge_config_t ocean_sponge_config_t type~ocean_config_t ocean_config_t type~ocean_config_t->type~ocean_sponge_config_t sponge 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 :: damp_source = "band"

How idamp_h/idamp_u/idamp_v are filled. "band" (default, implemented): cosine ramp from every OBC_SPONGE-tagged edge, summed at overlaps. "file" recognised but aborts at validate_config in v1 (PR-23b, needs the PR-14 reader).

real(kind=wp), public :: east_strength = -1.0_wp
integer, public :: east_width = -1
logical, public :: enable = .false.

Master switch. Off ⇒ legacy band kernels ⇒ byte-identical.

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

target_source="linear_z": dS/dz (PSU/m), z positive UP, so a stable column has lin_ds_dz < 0. Same convention as &ocean_zinit_nml lin_ds_dz.

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

target_source="linear_z": dT/dz (degC/m) with z positive UP, so a stable column has lin_dt_dz > 0. Same convention as &ocean_zinit_nml lin_dt_dz.

real(kind=wp), public :: lin_s_ref = 35.0_wp

target_source="linear_z": salinity (PSU) at the z = 0 datum. Same convention as &ocean_zinit_nml lin_s_ref.

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

target_source="linear_z": potential temperature (degC) at the z = 0 datum. Same convention as &ocean_zinit_nml lin_t_ref.

real(kind=wp), public :: north_strength = -1.0_wp
integer, public :: north_width = -1
character(len=16), public :: ramp = "cosine"

Shape of the damp_source="band" ramp from the sponge-tagged wall (d = 0) inward.

"cosine" (default, bit-identical): 0.5*(1 + cos(pi*d/band)) — the legacy band kernel’s own ramp.

"linear": (band - d - 0.5)/band, which is the CELL-CENTRE evaluation of a rate that rises linearly from zero at the interior edge of the band to full sponge_strength at the wall. That is ISOMIP+ Eq. (20), gamma(x) = gamma0*max(0, (x - x_r0)/(x_r1 - x_r0)) (Asay-Davis et al. 2016), with gamma0 = sponge_strength and band = (x_r1 - x_r0)/dx cells — no separate tau_boundary or x-range knob is needed, because the existing strength is already 1/tau in 1/s and the existing width already names the range.

logical, public :: relax_h = .false.

Interior-interface thickness damping. NOT IMPLEMENTED in PR-23 v1 — enable=.true., relax_h=.true. aborts fail-loud at validate_config (deferred to PR-23b; see the plan §14 Q1).

logical, public :: relax_tracers = .true.

Relax every registered tracer toward its 3-D reference field.

logical, public :: relax_uv = .true.

Relax u/v toward u_ref/v_ref. Default .true. matches today’s legacy path (momentum is the one thing the legacy sponge always damps); MOM6’s SPONGE_UV defaults .false..

real(kind=wp), public :: south_strength = -1.0_wp
integer, public :: south_width = -1
character(len=16), public :: target_source = "ic"

Reference-state source.

"ic" (default, implemented): snapshot the seeded initial condition (reachable as a “nudge toward a parent climatology” via &ocean_zinit_nml, no new reader).

"linear_z": an ANALYTIC affine geopotential profile, T(z) = lin_t_ref + lin_dt_dz*z and the salinity twin, re-evaluated on the LIVE layer geometry once per outer step. Independent of the initial condition, which is what makes an ISOMIP+ Ocean1 / Ocean2 (restore to a different water mass than you start from) expressible. Every tracer that is NOT temperature or salinity keeps the "ic" snapshot, and so do u_ref/v_ref.

"file" recognised but aborts at validate_config (PR-23b).

real(kind=wp), public :: west_strength = -1.0_wp

Per-edge peak relaxation-rate override (1/s). < 0 ⇒ inherit &ocean_bc_nml sponge_strength.

integer, public :: west_width = -1

Per-edge sponge-band width override (cells). < 0 ⇒ inherit &ocean_bc_nml sponge_width.


Source Code

   type :: ocean_sponge_config_t
      !! `&ocean_sponge_nml`: the map-driven sponge (PR-23). Default OFF
      !! (`enable = .false.`) ⇒ the legacy `&ocean_bc_nml` band kernels run
      !! unchanged ⇒ bit-identical. See `rdb_ocean_sponge.F90`'s module
      !! docstring for the physics; `docs/plans/PLAN_PR23_real_sponge.md`
      !! for the design record.
      logical :: enable = .false.
         !! Master switch. Off ⇒ legacy band kernels ⇒ byte-identical.
      character(len=16) :: damp_source = "band"
         !! How `idamp_h`/`idamp_u`/`idamp_v` are filled. `"band"` (default,
         !! implemented): cosine ramp from every `OBC_SPONGE`-tagged edge,
         !! summed at overlaps. `"file"` recognised but aborts at
         !! `validate_config` in v1 (PR-23b, needs the PR-14 reader).
      character(len=16) :: target_source = "ic"
         !! Reference-state source.
         !!
         !! `"ic"` (default, implemented): snapshot the seeded initial
         !! condition (reachable as a "nudge toward a parent climatology"
         !! via `&ocean_zinit_nml`, no new reader).
         !!
         !! `"linear_z"`: an ANALYTIC affine geopotential profile,
         !! `T(z) = lin_t_ref + lin_dt_dz*z` and the salinity twin,
         !! re-evaluated on the LIVE layer geometry once per outer step.
         !! Independent of the initial condition, which is what makes an
         !! ISOMIP+ Ocean1 / Ocean2 (restore to a different water mass
         !! than you start from) expressible. Every tracer that is NOT
         !! temperature or salinity keeps the `"ic"` snapshot, and so do
         !! `u_ref`/`v_ref`.
         !!
         !! `"file"` recognised but aborts at `validate_config` (PR-23b).
      character(len=16) :: ramp = "cosine"
         !! Shape of the `damp_source="band"` ramp from the sponge-tagged
         !! wall (`d = 0`) inward.
         !!
         !! `"cosine"` (default, bit-identical): `0.5*(1 + cos(pi*d/band))`
         !! — the legacy band kernel's own ramp.
         !!
         !! `"linear"`: `(band - d - 0.5)/band`, which is the CELL-CENTRE
         !! evaluation of a rate that rises linearly from zero at the
         !! interior edge of the band to full `sponge_strength` at the
         !! wall. That is ISOMIP+ Eq. (20),
         !! `gamma(x) = gamma0*max(0, (x - x_r0)/(x_r1 - x_r0))`
         !! (Asay-Davis et al. 2016), with `gamma0 = sponge_strength` and
         !! `band = (x_r1 - x_r0)/dx` cells — no separate `tau_boundary`
         !! or x-range knob is needed, because the existing strength is
         !! already `1/tau` in 1/s and the existing width already names
         !! the range.
      real(wp) :: lin_t_ref = 0.0_wp
         !! `target_source="linear_z"`: potential temperature (degC) at
         !! the `z = 0` datum. Same convention as `&ocean_zinit_nml
         !! lin_t_ref`.
      real(wp) :: lin_dt_dz = 0.0_wp
         !! `target_source="linear_z"`: dT/dz (degC/m) with **z positive
         !! UP**, so a stable column has `lin_dt_dz > 0`. Same convention
         !! as `&ocean_zinit_nml lin_dt_dz`.
      real(wp) :: lin_s_ref = 35.0_wp
         !! `target_source="linear_z"`: salinity (PSU) at the `z = 0`
         !! datum. Same convention as `&ocean_zinit_nml lin_s_ref`.
      real(wp) :: lin_ds_dz = 0.0_wp
         !! `target_source="linear_z"`: dS/dz (PSU/m), z positive UP, so a
         !! stable column has `lin_ds_dz < 0`. Same convention as
         !! `&ocean_zinit_nml lin_ds_dz`.
      logical :: relax_uv = .true.
         !! Relax `u`/`v` toward `u_ref`/`v_ref`. Default `.true.` matches
         !! today's legacy path (momentum is the one thing the legacy
         !! sponge always damps); MOM6's `SPONGE_UV` defaults `.false.`.
      logical :: relax_tracers = .true.
         !! Relax every registered tracer toward its 3-D reference field.
      logical :: relax_h = .false.
         !! Interior-interface thickness damping. NOT IMPLEMENTED in PR-23
         !! v1 — `enable=.true., relax_h=.true.` aborts fail-loud at
         !! `validate_config` (deferred to PR-23b; see the plan §14 Q1).
      integer :: west_width = -1
         !! Per-edge sponge-band width override (cells). `< 0` ⇒ inherit
         !! `&ocean_bc_nml sponge_width`.
      integer :: east_width = -1
      integer :: south_width = -1
      integer :: north_width = -1
      real(wp) :: west_strength = -1.0_wp
         !! Per-edge peak relaxation-rate override (1/s). `< 0` ⇒ inherit
         !! `&ocean_bc_nml sponge_strength`.
      real(wp) :: east_strength = -1.0_wp
      real(wp) :: south_strength = -1.0_wp
      real(wp) :: north_strength = -1.0_wp
   end type ocean_sponge_config_t