| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | ah_bg | = | -1.0_wp |
Background harmonic viscosity (m²/s) for the lateral closure. Negative (default) = derive from nu_h and kh_vel_scale. |
|
| real(kind=wp), | public | :: | ah_max | = | 1.0e4_wp |
Hard cap on the per-face harmonic viscosity (m²/s). |
|
| real(kind=wp), | public | :: | aniso_dir(2) | = | [1.0_wp, 0.0_wp] |
Anisotropy direction vector |
|
| integer, | public | :: | aniso_mode | = | 0 |
Anisotropy-direction mode. Only mode 0 (grid-relative
|
|
| real(kind=wp), | public | :: | bound_coef | = | 0.8_wp |
CFL safety coefficient for the per-cell viscosity limiters
(harmonic when |
|
| logical, | public | :: | bound_kh | = | .false. |
MOM6 |
|
| real(kind=wp), | public | :: | c_leith | = | 1.0_wp |
Dimensionless Leith coefficient. Typical range 1.0–2.0. |
|
| real(kind=wp), | public | :: | c_leith_bi | = | 0.0_wp |
Nondimensional biharmonic Leith constant. Drives
|
|
| real(kind=wp), | public | :: | c_smag | = | 0.15_wp |
Dimensionless Smagorinsky coefficient. Default 0.15 (range 0.1–0.2). |
|
| real(kind=wp), | public | :: | kh_aniso | = | 0.0_wp |
Anisotropic Laplacian viscosity magnitude (m²/s; Smith &
McWilliams 2003). When positive AND |
|
| real(kind=wp), | public | :: | kh_vel_scale | = | 0.0_wp |
Velocity scale (m/s) for the grid-resolution viscosity floor
|
|
| real(kind=wp), | public | :: | kh_vel_scale_live | = | 0.0_wp |
Live velocity-scale viscosity coefficient (m/s). When positive,
a state-dependent |
|
| character(len=16), | public | :: | lateral_closure | = | "none" |
Lateral-mixing closure tag. “none” (default) keeps the scalar
|
|
| logical, | public | :: | no_slip | = | .false. |
Lateral coast BC (static land mask). |
|
| real(kind=wp), | public | :: | nu_4 | = | 0.0_wp |
Constant biharmonic eddy viscosity for momentum (m⁴/s). Default 0. |
|
| real(kind=wp), | public | :: | nu_4_bg | = | 0.0_wp |
Background biharmonic viscosity floor (m⁴/s) for the flow-aware path. |
|
| real(kind=wp), | public | :: | nu_4_max | = | 1.0e12_wp |
Static hard cap on per-face biharmonic viscosity (m⁴/s). The
forward-Euler biharmonic-CFL bound is enforced automatically per
cell (scaled by |
|
| real(kind=wp), | public | :: | nu_h | = | 0.0_wp |
Constant horizontal eddy viscosity for momentum (m²/s). Default 0 = bit-identical; wind-driven runs need this set. |
|
| logical, | public | :: | resoln_scaled_visc | = | .false. |
Resolution-scaled Laplacian viscosity (Hallberg 2013). When
|
|
| logical, | public | :: | smag_ah | = | .false. |
Smagorinsky biharmonic. When |
|
| real(kind=wp), | public | :: | smag_bi_const | = | 0.06_wp |
Nondimensional biharmonic Smagorinsky constant. Typical 0.015–0.06. |
|
| logical, | public | :: | stress_tensor | = | .false. |
Horizontal-viscosity operator. |
type :: ocean_hvisc_config_t character(len=16) :: lateral_closure = "none" !! Lateral-mixing closure tag. "none" (default) keeps the scalar !! `nu_h`. "leith" = Leith vorticity-gradient scaling; !! "smagorinsky"/"smag" = Smagorinsky strain-rate scaling. Either !! gives a per-face viscosity floored at `ah_bg`, capped at `ah_max`. real(wp) :: c_smag = 0.15_wp !! Dimensionless Smagorinsky coefficient. Default 0.15 (range 0.1–0.2). real(wp) :: c_leith = 1.0_wp !! Dimensionless Leith coefficient. Typical range 1.0–2.0. real(wp) :: kh_vel_scale = 0.0_wp !! Velocity scale (m/s) for the grid-resolution viscosity floor !! `nu_min = kh_vel_scale · dx`. Typical 3e-3 m/s. real(wp) :: ah_bg = -1.0_wp !! Background harmonic viscosity (m²/s) for the lateral closure. !! Negative (default) = derive from nu_h and kh_vel_scale. real(wp) :: ah_max = 1.0e4_wp !! Hard cap on the per-face harmonic viscosity (m²/s). real(wp) :: kh_vel_scale_live = 0.0_wp !! Live velocity-scale viscosity coefficient (m/s). When positive, !! a state-dependent `A_vel = kh_vel_scale_live·dx·|u|` is !! max-combined into the per-face harmonic viscosity every step. !! Default 0 ⇒ off, bit-identical. real(wp) :: kh_aniso = 0.0_wp !! Anisotropic Laplacian viscosity magnitude (m²/s; Smith & !! McWilliams 2003). When positive AND `stress_tensor = .true.`, !! adds direction-tensor terms aligned with `aniso_dir`. Default 0 !! ⇒ isotropic, bit-identical. Stress-tensor path only. integer :: aniso_mode = 0 !! Anisotropy-direction mode. Only mode 0 (grid-relative !! `(n1,n2) = aniso_dir`) is implemented; other values rejected at !! configure (no silent fall-back). real(wp) :: aniso_dir(2) = [1.0_wp, 0.0_wp] !! Anisotropy direction vector `(n1,n2)` in grid i,j components. !! Default `(1,0)` = grid-i. Normalised internally. logical :: smag_ah = .false. !! Smagorinsky biharmonic. When `.true.` the biharmonic viscosity !! becomes flow-aware `nu4_face = C_b · L⁴ · |D|`, clamped to !! `[nu_4_bg, nu_4_max]`; the scalar `nu_4` is bypassed. real(wp) :: smag_bi_const = 0.06_wp !! Nondimensional biharmonic Smagorinsky constant. Typical 0.015–0.06. real(wp) :: c_leith_bi = 0.0_wp !! Nondimensional biharmonic Leith constant. Drives !! `lateral_closure="leith_biharm"` (per-face !! `nu4_face = C_lb · grid_sp⁶ · inv_PI6 · |∇²ζ|`, clamped to !! `[nu_4_bg, nu_4_max]`). Default 0.0 = no-op (startup warning if !! `leith_biharm` selected at 0.0). real(wp) :: nu_4_bg = 0.0_wp !! Background biharmonic viscosity floor (m⁴/s) for the flow-aware path. real(wp) :: nu_4_max = 1.0e12_wp !! Static hard cap on per-face biharmonic viscosity (m⁴/s). The !! forward-Euler biharmonic-CFL bound is enforced automatically per !! cell (scaled by `bound_coef`), so this is just an extra ceiling. real(wp) :: nu_h = 0.0_wp !! Constant horizontal eddy viscosity for momentum (m²/s). Default !! 0 = bit-identical; wind-driven runs need this set. real(wp) :: nu_4 = 0.0_wp !! Constant biharmonic eddy viscosity for momentum (m⁴/s). Default 0. logical :: no_slip = .false. !! Lateral coast BC (static land mask). `.false.` (default) = !! FREE-SLIP (corner vorticity/shear strain multiplied by `wet_q`); !! `.true.` = NO-SLIP (factor `2 - wet_q`). All-wet ⇒ bit-identical. logical :: stress_tensor = .false. !! Horizontal-viscosity operator. `.false.` (default) = !! velocity-Laplacian `A·∇²u` with global caps, bit-identical. !! `.true.` = thickness-weighted stress-divergence form !! (momentum-conserving) with per-cell CFL limiter and coast !! masking; reduces to the Laplacian on uniform-grid/h/all-wet. real(wp) :: bound_coef = 0.8_wp !! CFL safety coefficient for the per-cell viscosity limiters !! (harmonic when `stress_tensor`, biharmonic always when `nu_4 > 0` !! or Smag_AH). Default 0.8; must be ≤ 1. logical :: bound_kh = .false. !! MOM6 `BOUND_KH` analogue for the velocity-Laplacian paths: !! per-face clamp of the harmonic viscosity to !! `bound_coef·0.125/(dt·(1/dx²+1/dy²))` (~¼ of the forward- !! Euler stability limit). Prevents an over-large `nu_h` (or !! flow-aware coefficient) from putting the frozen depth-mean !! viscous forcing on the barotropic mode into the phase- !! reversed ANTI-damping regime at grid scale, which pumps an !! exponential rim-trapped barotropic mode via the split-RK2 !! Δu corrector (the 600² Lagrangian double-gyre blow-up). !! Recommended `.true.` for any config where !! `nu·dt·(1/dx²+1/dy²) ≳ 0.1`. Default `.false.` ⇒ !! bit-identical. logical :: resoln_scaled_visc = .false. !! Resolution-scaled Laplacian viscosity (Hallberg 2013). When !! `.true.` the dynamic Laplacian viscosity is multiplied by the !! VarMix resolution function `Res_fn ∈ [0,1]` before the `ah_max` !! clamp (biharmonic `nu_4` never scaled). Requires !! `&ocean_varmix_nml enable=.true.`. Default `.false.` ⇒ bit-identical. end type ocean_hvisc_config_t