ocean_tdrag_config_t Derived Type

type, public :: ocean_tdrag_config_t

&ocean_tdrag_nml — ICE-SHELF TOP drag, the mirror of &ocean_bdrag_nml at k = nz. Requires &ocean_cavity_dyn_nml enable (without a draft there is no ice base and cover_frac is identically zero, so the kernel would be a no-op with a cost). Default enable = .false. ⇒ the slot is a placeholder, no kernel runs, every path is bit-identical.


Inherited by

type~~ocean_tdrag_config_t~~InheritedByGraph type~ocean_tdrag_config_t ocean_tdrag_config_t type~ocean_config_t ocean_config_t type~ocean_config_t->type~ocean_tdrag_config_t tdrag 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
real(kind=wp), public :: bg_vel = 0.0_wp

Background velocity floor (m/s) in the quadratic speed. Zero (default) ⇒ the layer-only quadratic branch is the exact algebraic mirror of the bottom drag’s.

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

Quadratic drag coefficient (dimensionless). ISOMIP+ value 2.5e-3 (Asay-Davis et al. 2016 Table 4). Zero disables the quadratic branch. When &ocean_cavity_melt_nml enable, this is THE C_d for both momentum and the melt friction velocity — see the cdrag_top agreement rule in validate_config.

logical, public :: enable = .false.

Master switch. Requires &ocean_cavity_dyn_nml enable.

character(len=16), public :: form = "quadratic"

Top-drag variant: “quadratic” (default, du/dt = -C_d*|U|*u/h, the ISOMIP+ prescription) or “linear” (Rayleigh du/dt = -r*u). Enum mirrors parse_tdrag_variant in rdb_ocean_top_drag.

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

Top-boundary-layer thickness (m) the stress is distributed over (the mirror of &ocean_bdrag_nml hbbl). Zero (default) = layer-nz-only. Positive values keep the explicit drag rate finite where a sigma coordinate thins the top layer near a grounding line.

logical, public :: implicit = .false.

Backward-Euler top drag inside the drag kernel: u^{n+1} = u/(1 + dt*lambda), unconditionally stable for any top-layer thickness. Default .false. = explicit forward Euler (bit-identical to the pre-knob path, but conditionally unstable when lambda*dt > 1). Mutually exclusive with &ocean_vdiff_nml implicit_top_drag.

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

Linear Rayleigh coefficient (1/s). Active when form = "linear".

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

Minimum effective TBL thickness (m) in the stress/h_tbl denominator. Zero (default) falls back to the kernel’s h_min (1e-3 m), matching the bottom drag.


Source Code

   type :: ocean_tdrag_config_t
      !! `&ocean_tdrag_nml` — ICE-SHELF TOP drag, the mirror of
      !! `&ocean_bdrag_nml` at `k = nz`.  Requires
      !! `&ocean_cavity_dyn_nml enable` (without a draft there is no ice
      !! base and `cover_frac` is identically zero, so the kernel would
      !! be a no-op with a cost).  Default `enable = .false.` ⇒ the slot
      !! is a placeholder, no kernel runs, every path is bit-identical.
      logical :: enable = .false.
         !! Master switch.  Requires `&ocean_cavity_dyn_nml enable`.
      character(len=16) :: form = "quadratic"
         !! Top-drag variant: "quadratic" (default, `du/dt =
         !! -C_d*|U|*u/h`, the ISOMIP+ prescription) or "linear"
         !! (Rayleigh `du/dt = -r*u`).  Enum mirrors
         !! `parse_tdrag_variant` in `rdb_ocean_top_drag`.
      real(wp) :: cd = 0.0_wp
         !! Quadratic drag coefficient (dimensionless).  ISOMIP+ value
         !! 2.5e-3 (Asay-Davis et al. 2016 Table 4).  Zero disables the
         !! quadratic branch.  When `&ocean_cavity_melt_nml enable`, this
         !! is THE `C_d` for both momentum and the melt friction
         !! velocity — see the `cdrag_top` agreement rule in
         !! `validate_config`.
      real(wp) :: r = 0.0_wp
         !! Linear Rayleigh coefficient (1/s).  Active when
         !! `form = "linear"`.
      real(wp) :: htbl = 0.0_wp
         !! Top-boundary-layer thickness (m) the stress is distributed
         !! over (the mirror of `&ocean_bdrag_nml hbbl`).  Zero (default)
         !! = layer-`nz`-only.  Positive values keep the explicit drag
         !! rate finite where a sigma coordinate thins the top layer near
         !! a grounding line.
      real(wp) :: bg_vel = 0.0_wp
         !! Background velocity floor (m/s) in the quadratic speed.
         !! Zero (default) ⇒ the layer-only quadratic branch is the exact
         !! algebraic mirror of the bottom drag's.
      real(wp) :: tbl_thick_min = 0.0_wp
         !! Minimum effective TBL thickness (m) in the `stress/h_tbl`
         !! denominator.  Zero (default) falls back to the kernel's
         !! `h_min` (1e-3 m), matching the bottom drag.
      logical :: implicit = .false.
         !! Backward-Euler top drag inside the drag kernel:
         !! `u^{n+1} = u/(1 + dt*lambda)`, unconditionally stable for any
         !! top-layer thickness.  Default `.false.` = explicit forward
         !! Euler (bit-identical to the pre-knob path, but conditionally
         !! unstable when `lambda*dt > 1`).  Mutually exclusive with
         !! `&ocean_vdiff_nml implicit_top_drag`.
   end type ocean_tdrag_config_t