MOM_vert_friction module reference
Implements vertical viscosity (vertvisc)
Data Types
The control structure with parameters and memory for the MOM_vert_friction module |
Functions/Subroutines
Add nonlocal stress increments to ui^n and vi^n. |
|
Compute coupling coefficient associated with vertical viscosity parameterization as in Greatbatch and Lamb (1990), hereafter referred to as the GL90 vertical viscosity parameterization. This vertical viscosity scheme redistributes momentum in the vertical, and is the equivalent of the Gent & McWilliams (1990) parameterization, but in a TWA (thickness-weighted averaged) set of equations. The vertical viscosity coefficient nu is computed from kappa_GM via thermal wind balance, and the following relation: nu = kappa_GM * f^2 / N^2. In the following subroutine kappa_GM is assumed either (a) constant or (b) horizontally varying. In both cases, (a) and (b), one can additionally impose an EBT structure in the vertical for kappa_GM. A third possible formulation of nu is depth-independent: nu = f^2 * alpha The latter formulation would be equivalent to a kappa_GM that varies as N^2 with depth. The vertical viscosity del_z ( nu del_z u) is applied to the momentum equation with stress-free boundary conditions at the top and bottom. |
|
Perform a fully implicit vertical diffusion of momentum. Stress top and bottom boundary conditions are used. |
|
Calculate the fraction of momentum originally in a layer that remains in the water column after a time-step of viscosity, equivalently the fraction of a time-step's worth of barotropic acceleration that a layer experiences after viscosity is applied. |
|
Calculate the coupling coefficients (CS%a_u, CS%a_v, CS%a_u_gl90, CS%a_v_gl90) and effective layer thicknesses (CS%h_u and CS%h_v) for later use in the applying the implicit vertical viscosity via vertvisc(). |
|
Calculate the 'coupling coefficient' (a_cpl) at the interfaces. If BOTTOMDRAGLAW is defined, the minimum of Hbbl and half the adjacent layer thicknesses are used to calculate a_cpl near the bottom. |
|
Velocity components which exceed a threshold for physically reasonable values are truncated, and the running sum of the number of trunctionas within the non-symmetric memory computational domain is incremented. Optionally, any column with excessive velocities may be sent to a diagnostic reporting subroutine. |
|
Initialize the vertical friction module |
|
Update the CFL truncation value as a function of time. If called with the optional argument activate=.true., record the value of Time as the beginning of the ramp period. |
|
Clean up and deallocate the vertical friction module |
Detailed Description
Author: Robert Hallberg
Date: April 1994 - October 2006
The vertical diffusion of momentum is fully implicit. This is necessary to allow for vanishingly small layers. The coupling is based on the distance between the centers of adjacent layers, except where a layer is close to the bottom compared with a bottom boundary layer thickness when a bottom drag law is used. A stress top b.c. and a no slip bottom b.c. are used. There is no limit on the time step for vertvisc.
Near the bottom, the horizontal thickness interpolation scheme changes to an upwind biased estimate to control the effect of spurious Montgomery potential gradients at the bottom where nearly massless layers layers ride over the topography. Within a few boundary layer depths of the bottom, the harmonic mean thickness (i.e. (2 h+ h-) / (h+ + h-) ) is used if the velocity is from the thinner side and the arithmetic mean thickness (i.e. (h+ + h-)/2) is used if the velocity is from the thicker side. Both of these thickness estimates are second order accurate. Above this the arithmetic mean thickness is used.
In addition, vertvisc truncates any velocity component that exceeds a maximum CFL number to a fraction of this value. This basically keeps instabilities spatially localized. The number of times the velocity is truncated is reported each time the energies are saved, and if exceeds CS%Maxtrunc the model will stop itself and change the time to a large value. This has proven very useful in (1) diagnosing model failures and (2) letting the model settle down to a meaningful integration from a poorly specified initial condition.
The same code is used for the two velocity components, by indirectly referencing the velocities and defining a handful of direction-specific defined variables.
Macros written all in capital letters are defined in MOM_memory.h.
A small fragment of the grid is shown below:
j+1 x ^ x ^ x At x: q
j+1 > o > o > At ^: v, frhatv, tauy
j x ^ x ^ x At >: u, frhatu, taux
j > o > o > At o: h
j-1 x ^ x ^ x
i-1 i i+1 At x & ^:
i i+1 At > & o:
The boundaries always run through q grid points (x).
Type Documentation
- type, public :: vertvisc_CS
The control structure with parameters and memory for the MOM_vert_friction module
- Parameters
initialized
True if this control structure has been initialized.
Hmix
The mixed layer thickness [Z ~> m].
Hmix_stress
The mixed layer thickness over which the wind stress is applied with direct_stress [H ~> m or kg m-2].
Kvml_invZ2
The extra vertical viscosity scale in [H Z T-1 ~> m2 s-1 or Pa s] in a surface mixed layer with a characteristic thickness given by Hmix, and scaling proportional to (Hmix/z)^2, where z is the distance from the surface; this can get very large with thin layers.
Kv
The interior vertical viscosity [H Z T-1 ~> m2 s-1 or Pa s].
Hbbl
The static bottom boundary layer thickness [Z ~> m].
Hbbl_gl90
The static bottom boundary layer thickness used for GL90 [Z ~> m].
Kv_extra_bbl
An extra vertical viscosity in the bottom boundary layer of thickness Hbbl when there is not a bottom drag law in use [H Z T-1 ~> m2 s-1 or Pa s].
vonKar
The von Karman constant as used for mixed layer viscosity [nondim]
use_GL90_in_SSW
If true, use the GL90 parameterization in stacked shallow water mode (SSW). The calculation of the GL90 viscosity coefficient uses the fact that in SSW we simply have 1/N^2 = h/g^prime, where g^prime is the reduced gravity. This identity does not generalize to non-SSW setups.
use_GL90_N2
If true, use GL90 vertical viscosity coefficient that is depth-independent; this corresponds to a kappa_GM that scales as N^2 with depth.
kappa_gl90
The scalar diffusivity used in the GL90 vertical viscosity scheme [L2 H Z-1 T-1 ~> m2 s-1 or Pa s]
read_kappa_gl90
If true, read a file containing the spatially varying kappa_gl90
alpha_gl90
Coefficient used to compute a depth-independent GL90 vertical viscosity via Kv_gl90 = alpha_gl90 * f^2. Note that the implied Kv_gl90 corresponds to a kappa_gl90 that scales as N^2 with depth. [H Z T ~> m2 s or kg s m-1]
vel_underflow
Velocity components smaller than vel_underflow are set to 0 [L T-1 ~> m s-1].
CFL_trunc
Velocity components will be truncated when they are large enough that the corresponding CFL number exceeds this value [nondim].
CFL_report
The value of the CFL number that will cause the accelerations to be reported [nondim]. CFL_report will often equal CFL_trunc.
truncRampTime
The time-scale over which to ramp up the value of CFL_trunc from CFL_truncS to CFL_truncE [T ~> s]
CFL_truncS
The start value of CFL_trunc [nondim]
CFL_truncE
The end/target value of CFL_trunc [nondim]
CFLrampingIsActivated
True if the ramping has been initialized
rampStartTime
The time at which the ramping of CFL_trunc starts
a_u
The u-drag coefficient across an interface [H T-1 ~> m s-1 or Pa s m-1]
a_u_gl90
The u-drag coefficient associated with GL90 across an interface [H T-1 ~> m s-1 or Pa s m-1]
h_u
The effective layer thickness at u-points [H ~> m or kg m-2].
a_v
The v-drag coefficient across an interface [H T-1 ~> m s-1 or Pa s m-1]
a_v_gl90
The v-drag coefficient associated with GL90 across an interface [H T-1 ~> m s-1 or Pa s m-1]
h_v
The effective layer thickness at v-points [H ~> m or kg m-2].
a1_shelf_u
The u-momentum coupling coefficient under ice shelves [H T-1 ~> m s-1 or Pa s m-1]. Retained to determine stress under shelves.
a1_shelf_v
The v-momentum coupling coefficient under ice shelves [H T-1 ~> m s-1 or Pa s m-1]. Retained to determine stress under shelves.
split
If true, use the split time stepping scheme.
bottomdraglaw
If true, the bottom stress is calculated with a drag law c_drag*|u|*u. The velocity magnitude may be an assumed value or it may be based on the actual velocity in the bottommost HBBL, depending on whether linear_drag is true.
harmonic_visc
If true, the harmonic mean thicknesses are used to calculate the viscous coupling between layers except near the bottom. Otherwise the arithmetic mean thickness is used except near the bottom.
harm_BL_val
A scale to determine when water is in the boundary layers based solely on harmonic mean thicknesses for the purpose of determining the extent to which the thicknesses used in the viscosities are upwinded [nondim].
direct_stress
If true, the wind stress is distributed over the topmost Hmix_stress of fluid, and an added mixed layer viscosity or a physically based boundary layer turbulence parameterization is not needed for stability.
dynamic_viscous_ML
If true, use the results from a dynamic calculation, perhaps based on a bulk Richardson number criterion, to determine the mixed layer thickness for viscosity.
fixed_LOTW_ML
If true, use a Law-of-the-wall prescription for the mixed layer viscosity within a boundary layer that is the lesser of Hmix and the total depth of the ocean in a column.
apply_LOTW_floor
If true, use a Law-of-the-wall prescription to set a lower bound on the viscous coupling between layers within the surface boundary layer, based the distance of interfaces from the surface. This only acts when there are large changes in the thicknesses of successive layers or when the viscosity is set externally and the wind stress has subsequently increased.
answer_date
The vintage of the order of arithmetic and expressions in the viscous calculations. Values below 20190101 recover the answers from the end of 2018, while higher values use expressions that do not use an arbitrary and hard-coded maximum viscous coupling coefficient between layers. In non-Boussinesq cases, values below 20230601 recover a form of the viscosity within the mixed layer that breaks up the magnitude of the wind stress with BULKMIXEDLAYER, DYNAMIC_VISCOUS_ML or FIXED_DEPTH_LOTW_ML, but not LOTW_VISCOUS_ML_FLOOR.
debug
If true, write verbose checksums for debugging purposes.
nkml
The number of layers in the mixed layer.
ntrunc
The number of times the velocity has been truncated since the last call to write_energy.
u_trunc_file
The complete path to a file in which a column of u-accelerations are written if velocity truncations occur.
v_trunc_file
The complete path to a file in which a column of v-accelerations are written if velocity truncations occur.
StokesMixing
If true, do Stokes drift mixing via the Lagrangian current (Eulerian plus Stokes drift). False by default and set via STOKES_MIXING_COMBINED.
diag
A structure that is used to regulate the timing of diagnostic output.
id_du_dt_visc
Diagnostic identifiers
id_dv_dt_visc
Diagnostic identifiers
id_du_dt_visc_gl90
Diagnostic identifiers
id_dv_dt_visc_gl90
Diagnostic identifiers
id_GLwork
Diagnostic identifiers
id_au_vv
Diagnostic identifiers
id_av_vv
Diagnostic identifiers
id_au_gl90_vv
Diagnostic identifiers
id_av_gl90_vv
Diagnostic identifiers
id_du_dt_str
Diagnostic identifiers
id_dv_dt_str
Diagnostic identifiers
id_h_u
Diagnostic identifiers
id_h_v
Diagnostic identifiers
id_hML_u
Diagnostic identifiers
id_hML_v
Diagnostic identifiers
id_Omega_w2x
Diagnostic identifiers
id_FPtau2s
Diagnostic identifiers
id_FPtau2w
Diagnostic identifiers
id_uE_h
Diagnostic identifiers
id_vE_h
Diagnostic identifiers
id_uStk
Diagnostic identifiers
id_vStk
Diagnostic identifiers
id_uStk0
Diagnostic identifiers
id_vStk0
Diagnostic identifiers
id_uInc_h
Diagnostic identifiers
id_vInc_h
Diagnostic identifiers
id_taux_bot
Diagnostic identifiers
id_tauy_bot
Diagnostic identifiers
id_Kv_slow
Diagnostic identifiers
id_Kv_u
Diagnostic identifiers
id_Kv_v
Diagnostic identifiers
id_Kv_gl90_u
Diagnostic identifiers
id_Kv_gl90_v
Diagnostic identifiers
id_h_du_dt_visc
Diagnostic identifiers
id_h_dv_dt_visc
Diagnostic identifiers
id_hf_du_dt_visc_2d
Diagnostic identifiers
id_hf_dv_dt_visc_2d
Diagnostic identifiers
id_h_du_dt_str
Diagnostic identifiers
id_h_dv_dt_str
Diagnostic identifiers
id_du_dt_str_visc_rem
Diagnostic identifiers
id_dv_dt_str_visc_rem
Diagnostic identifiers
PointAccel_CSp
A pointer to the control structure for recording accelerations leading to velocity truncations
pass_KE_uv
A handle used for group halo passes
Functions/Subroutine Documentation
- subroutine vertFPmix(ui, vi, uold, vold, hbl_h, h, forces, dt, lpost, Cemp_NL, G, GV, US, CS, OBC, Waves)
Add nonlocal stress increments to ui^n and vi^n.
- Parameters
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
ui [inout]
Zonal velocity after vertvisc [L T-1 ~> m s-1]
vi [inout]
Meridional velocity after vertvisc [L T-1 ~> m s-1]
uold [inout]
Old Zonal velocity [L T-1 ~> m s-1]
vold [inout]
Old Meridional velocity [L T-1 ~> m s-1]
hbl_h [inout]
boundary layer depth [H ~> m]
h [in]
Layer thicknesses [H ~> m or kg m-2]
forces [in]
A structure with the driving mechanical forces
dt [in]
Time increment [T ~> s]
Cemp_NL [in]
empirical coefficient of non-local momentum mixing [nondim]
lpost [in]
Compute and make available FPMix diagnostics
US [in]
A dimensional unit scaling type
CS
Vertical viscosity control structure
OBC
Open boundary condition structure
Waves
Container for wave/Stokes information
hbl_u
boundary layer depth (u-pts) [H ~> m]
hbl_v
boundary layer depth (v-pts) [H ~> m]
taux_u
kinematic zonal wind stress (u-pts) [L Z T-2 ~> m2 s-2]
tauy_v
kinematic merid wind stress (v-pts) [L Z T-2 ~> m2 s-2]
uS0
surface zonal Stokes drift h-pts [L T-1 ~> m s-1]
vS0
surface zonal Stokes drift h-pts [L T-1 ~> m s-1]
uE_u
zonal Eulerian u-pts [L T-1 ~> m s-1]
uE_h
zonal Eulerian h-pts [L T-1 ~> m s-1]
vE_v
merid Eulerian v-pts [L T-1 ~> m s-1]
vE_h
merid Eulerian h-pts [L T-1 ~> m s-1]
uInc_u
zonal Eulerian u-pts [L T-1 ~> m s-1]
uInc_h
zonal Eulerian h-pts [L T-1 ~> m s-1]
vInc_v
merid Eulerian v-pts [L T-1 ~> m s-1]
vInc_h
merid Eulerian h-pts [L T-1 ~> m s-1]
uStk
zonal Stokes Drift (h-pts) [L T-1 ~> m s-1]
vStk
merid Stokes Drift (h-pts) [L T-1 ~> m s-1]
omega_tau2s
angle stress to shear (h-pts) [rad]
omega_tau2w
angle stress to wind (h-pts) [rad]
omega_tmp
temporary angle wrt the x axis [rad]
omega_s2x
temporary angle wrt the x axis [rad]
omega_tau2x
temporary angle wrt the x axis [rad]
Irho0
Inverse of the mean density [R-1 ~> m3 kg-1]
pi
! The ratio of the circumference of a circle to its diameter [nondim]
tmp_u
temporary ocean mask weights on u and v points [nondim]
tmp_v
temporary ocean mask weights on u and v points [nondim]
fexp
temporary exponential function [nondim]
sigma
temporary normalize boundary layer coordinate [nondim]
Gat1
Shape parameters [nondim]
Gsig
Shape parameters [nondim]
dGdsig
Shape parameters [nondim]
du
Intermediate velocity differences [L T-1 ~> m s-1]
dv
Intermediate velocity differences [L T-1 ~> m s-1]
depth
Cumulative of thicknesses [H ~> m]
b
band and vertical indices
kp1
band and vertical indices
k
band and vertical indices
nz
band and vertical indices
i
horizontal indices
j
horizontal indices
is
horizontal indices
ie
horizontal indices
js
horizontal indices
je
horizontal indices
Isq
horizontal indices
Ieq
horizontal indices
Jsq
horizontal indices
Jeq
horizontal indices
Callees call graph
Callers call graph
External calls
- cvmix_kpp
cvmix_kpp_composite_Gshape (cvmix_kpp::cvmix_kpp_composite_gshape)
- subroutine find_coupling_coef_gl90(a_cpl_gl90, hvel, i, j, z_i, G, GV, CS, VarMix, work_on_u)
Compute coupling coefficient associated with vertical viscosity parameterization as in Greatbatch and Lamb (1990), hereafter referred to as the GL90 vertical viscosity parameterization. This vertical viscosity scheme redistributes momentum in the vertical, and is the equivalent of the Gent & McWilliams (1990) parameterization, but in a TWA (thickness-weighted averaged) set of equations. The vertical viscosity coefficient nu is computed from kappa_GM via thermal wind balance, and the following relation: nu = kappa_GM * f^2 / N^2. In the following subroutine kappa_GM is assumed either (a) constant or (b) horizontally varying. In both cases, (a) and (b), one can additionally impose an EBT structure in the vertical for kappa_GM. A third possible formulation of nu is depth-independent: nu = f^2 * alpha The latter formulation would be equivalent to a kappa_GM that varies as N^2 with depth. The vertical viscosity del_z ( nu del_z u) is applied to the momentum equation with stress-free boundary conditions at the top and bottom.
In SSW mode, we have 1/N^2 = h/g'. The coupling coefficient is therefore equal to a_cpl_gl90 = nu / h = kappa_GM * f^2 / g' or a_cpl_gl90 = nu / h = f^2 * alpha / h
- Parameters
G [in]
Grid structure.
GV [in]
Vertical grid structure.
hvel [in]
Distance between interfaces at velocity points [Z ~> m]
i [in]
Column i-index
j [in]
Column j-index
z_i [in]
Estimate of interface heights above the bottom, normalized by the GL90 bottom boundary layer thickness [nondim]
a_cpl_gl90 [out]
Coupling coefficient associated with GL90 across interfaces; is not included in a_cpl [H T-1 ~> m s-1 or Pa s m-1].
CS [in]
Vertical viscosity control structure
VarMix [in]
Variable mixing coefficients
work_on_u [in]
If true, u-points are being calculated, otherwise they are v-points.
f2
Squared Coriolis parameter at a velocity grid point [T-2 ~> s-2].
Callers call graph
- subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, taux_bot, tauy_bot, fpmix, Waves)
Perform a fully implicit vertical diffusion of momentum. Stress top and bottom boundary conditions are used.
This is solving the tridiagonal system
\begin{equation*} \left(h_k + a_{k + 1/2} + a_{k - 1/2} + r_k\right) u_k^{n+1} = h_k u_k^n + a_{k + 1/2} u_{k+1}^{n+1} + a_{k - 1/2} u_{k-1}^{n+1} \end{equation*}where \(a_{k + 1/2} = \Delta t \nu_{k + 1/2} / h_{k + 1/2}\) is the interfacial coupling thickness per time step, encompassing background viscosity as well as contributions from enhanced mixed and bottom layer viscosities. $r_k$ is a Rayleigh drag term due to channel drag. There is an additional stress term on the right-hand side if DIRECT_STRESS is true, applied to the surface layer.
- Parameters
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
US [in]
A dimensional unit scaling type
u [inout]
Zonal velocity [L T-1 ~> m s-1]
v [inout]
Meridional velocity [L T-1 ~> m s-1]
h [in]
Layer thickness [H ~> m or kg m-2]
forces [in]
A structure with the driving mechanical forces
visc [inout]
Viscosities and bottom drag
dt [in]
Time increment [T ~> s]
OBC
Open boundary condition structure
ADp [inout]
Accelerations in the momentum equations for diagnostics
CDp [inout]
Continuity equation terms
CS
Vertical viscosity control structure
taux_bot [out]
Zonal bottom stress from ocean to rock [R L Z T-2 ~> Pa]
tauy_bot [out]
Meridional bottom stress from ocean to rock [R L Z T-2 ~> Pa]
fpmix [in]
fpmix along Eulerian shear
Waves
Container for wave/Stokes information
Callees call graph
Text view
mom_vert_friction::vertvisc → mom_diag_mediator::interface::post_data
mom_vert_friction::vertvisc → mom_diag_mediator::post_product_sum_u
mom_vert_friction::vertvisc → mom_diag_mediator::post_product_sum_v
mom_vert_friction::vertvisc → mom_diag_mediator::post_product_u
mom_vert_friction::vertvisc → mom_diag_mediator::post_product_v
mom_vert_friction::vertvisc → mom_diag_mediator::query_averaging_enabled
mom_vert_friction::vertvisc → mom_domain_infra::do_group_pass
mom_vert_friction::vertvisc → mom_domain_infra::interface::create_group_pass
mom_vert_friction::vertvisc → mom_vert_friction::vertvisc_limit_vel
Callers call graph
Text view
mom_dynamics_split_rk2::step_mom_dyn_split_rk2 → mom_vert_friction::vertvisc
mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b → mom_vert_friction::vertvisc
mom_dynamics_unsplit::step_mom_dyn_unsplit → mom_vert_friction::vertvisc
mom_dynamics_unsplit_rk2::step_mom_dyn_unsplit_rk2 → mom_vert_friction::vertvisc
- subroutine vertvisc_remnant(visc, visc_rem_u, visc_rem_v, dt, G, GV, US, CS)
Calculate the fraction of momentum originally in a layer that remains in the water column after a time-step of viscosity, equivalently the fraction of a time-step's worth of barotropic acceleration that a layer experiences after viscosity is applied.
- Parameters
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
visc [in]
Viscosities and bottom drag
visc_rem_u [inout]
Fraction of a time-step's worth of a barotropic acceleration that a layer experiences after viscosity is applied in the zonal direction [nondim]
visc_rem_v [inout]
Fraction of a time-step's worth of a barotropic acceleration that a layer experiences after viscosity is applied in the meridional direction [nondim]
dt [in]
Time increment [T ~> s]
US [in]
A dimensional unit scaling type
CS
Vertical viscosity control structure
Callees call graph
- subroutine vertvisc_coef(u, v, h, dz, forces, visc, tv, dt, G, GV, US, CS, OBC, VarMix)
Calculate the coupling coefficients (CS%a_u, CS%a_v, CS%a_u_gl90, CS%a_v_gl90) and effective layer thicknesses (CS%h_u and CS%h_v) for later use in the applying the implicit vertical viscosity via vertvisc().
- Parameters
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
US [in]
A dimensional unit scaling type
u [in]
Zonal velocity [L T-1 ~> m s-1]
v [in]
Meridional velocity [L T-1 ~> m s-1]
h [in]
Layer thickness [H ~> m or kg m-2]
dz [in]
Vertical distance across layers [Z ~> m]
forces [in]
A structure with the driving mechanical forces
visc [in]
Viscosities and bottom drag
tv [in]
A structure containing pointers to any available thermodynamic fields.
dt [in]
Time increment [T ~> s]
CS [inout]
Vertical viscosity control structure
OBC
Open boundary condition structure
VarMix [in]
Variable mixing coefficients
Callees call graph
Text view
mom_vert_friction::vertvisc_coef → mom_checksums::interface::uvchksum
mom_vert_friction::vertvisc_coef → mom_diag_mediator::interface::post_data
mom_vert_friction::vertvisc_coef → mom_diag_mediator::query_averaging_enabled
mom_vert_friction::vertvisc_coef → mom_error_handler::mom_error
mom_vert_friction::vertvisc_coef → mom_forcing_type::interface::find_ustar
mom_vert_friction::vertvisc_coef → mom_vert_friction::find_coupling_coef
mom_vert_friction::vertvisc_coef → mom_vert_friction::find_coupling_coef_gl90
Callers call graph
Text view
mom_dynamics_split_rk2::step_mom_dyn_split_rk2 → mom_vert_friction::vertvisc_coef
mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b → mom_vert_friction::vertvisc_coef
mom_dynamics_unsplit::step_mom_dyn_unsplit → mom_vert_friction::vertvisc_coef
mom_dynamics_unsplit_rk2::step_mom_dyn_unsplit_rk2 → mom_vert_friction::vertvisc_coef
- subroutine find_coupling_coef(a_cpl, hvel, i, j, h_harm, bbl_thick, kv_bbl, z_i, h_ml, dt, G, GV, US, CS, visc, Ustar_2d, tv, work_on_u, OBC, shelf)
Calculate the 'coupling coefficient' (a_cpl) at the interfaces. If BOTTOMDRAGLAW is defined, the minimum of Hbbl and half the adjacent layer thicknesses are used to calculate a_cpl near the bottom.
- Parameters
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
US [in]
A dimensional unit scaling type
a_cpl [out]
Coupling coefficient across interfaces [H T-1 ~> m s-1 or Pa s m-1]
hvel [in]
Distance between interfaces at velocity points [Z ~> m]
i [in]
Column i-index
j [in]
Column j-index
h_harm [in]
Harmonic mean of thicknesses around a velocity grid point [Z ~> m]
bbl_thick [in]
Bottom boundary layer thickness [Z ~> m]
kv_bbl [in]
Bottom boundary layer viscosity, exclusive of any depth-dependent contributions from visc%Kv_shear [H Z T-1 ~> m2 s-1 or Pa s]
z_i [in]
Estimate of interface heights above the bottom, normalized by the bottom boundary layer thickness [nondim]
h_ml [out]
Mixed layer depth [Z ~> m]
dt [in]
Time increment [T ~> s]
CS [in]
Vertical viscosity control structure
visc [in]
Structure containing viscosities and bottom drag
Ustar_2d [in]
The wind friction velocity, calculated using the Boussinesq reference density or the time-evolving surface density in non-Boussinesq mode [Z T-1 ~> m s-1]
tv [in]
A structure containing pointers to any available thermodynamic fields.
work_on_u [in]
If true, u-points are being calculated, otherwise they are v-points
OBC
Open boundary condition structure
shelf [in]
If present and true, use a surface boundary condition appropriate for an ice shelf.
Callers call graph
- subroutine vertvisc_limit_vel(u, v, h, ADp, CDp, forces, visc, dt, G, GV, US, CS)
Velocity components which exceed a threshold for physically reasonable values are truncated, and the running sum of the number of trunctionas within the non-symmetric memory computational domain is incremented. Optionally, any column with excessive velocities may be sent to a diagnostic reporting subroutine.
- Parameters
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
US [in]
A dimensional unit scaling type
u [inout]
Zonal velocity [L T-1 ~> m s-1]
v [inout]
Meridional velocity [L T-1 ~> m s-1]
h [in]
Layer thickness [H ~> m or kg m-2]
ADp [in]
Acceleration diagnostic pointers
CDp [in]
Continuity diagnostic pointers
forces [in]
A structure with the driving mechanical forces
visc [in]
Viscosities and bottom drag
dt [in]
Time increment [T ~> s]
CS
Vertical viscosity control structure
Callees call graph
- subroutine vertvisc_init(MIS, Time, G, GV, US, param_file, diag, ADp, dirs, ntrunc, CS, fpmix)
Initialize the vertical friction module
- Parameters
MIS [in]
The "MOM Internal State", a set of pointers to the fields and accelerations that make up the ocean's physical state
Time [in]
Current model time
G [in]
Ocean grid structure
GV [in]
Ocean vertical grid structure
US [in]
A dimensional unit scaling type
param_file [in]
File to parse for parameters
diag [inout]
Diagnostic control structure
ADp [inout]
Acceleration diagnostic pointers
dirs [in]
Relevant directory paths
ntrunc [inout]
Number of velocity truncations
CS
Vertical viscosity control structure
fpmix [in]
Nonlocal momentum mixing
Callees call graph
Text view
mom_vert_friction::vertvisc_init → mom_diag_mediator::register_diag_field
mom_vert_friction::vertvisc_init → mom_domain_infra::interface::pass_var
mom_vert_friction::vertvisc_init → mom_error_handler::mom_error
mom_vert_friction::vertvisc_init → mom_file_parser::interface::get_param
mom_vert_friction::vertvisc_init → mom_file_parser::interface::log_param
mom_vert_friction::vertvisc_init → mom_file_parser::interface::log_version
mom_vert_friction::vertvisc_init → mom_io::interface::mom_read_data
mom_vert_friction::vertvisc_init → mom_pointaccel::pointaccel_init
mom_vert_friction::vertvisc_init → mom_safe_alloc::interface::safe_alloc_ptr
mom_vert_friction::vertvisc_init → mom_string_functions::slasher
Callers call graph
Text view
mom_dynamics_split_rk2::initialize_dyn_split_rk2 → mom_vert_friction::vertvisc_init
mom_dynamics_split_rk2b::initialize_dyn_split_rk2b → mom_vert_friction::vertvisc_init
mom_dynamics_unsplit::initialize_dyn_unsplit → mom_vert_friction::vertvisc_init
mom_dynamics_unsplit_rk2::initialize_dyn_unsplit_rk2 → mom_vert_friction::vertvisc_init
- subroutine updateCFLtruncationValue(Time, CS, US, activate)
Update the CFL truncation value as a function of time. If called with the optional argument activate=.true., record the value of Time as the beginning of the ramp period.
- Parameters
Time [in]
Current model time
CS
Vertical viscosity control structure
US [in]
A dimensional unit scaling type
activate [in]
Specify whether to record the value of Time as the beginning of the ramp period
Callees call graph
Callers call graph
Text view
mom_dynamics_split_rk2::initialize_dyn_split_rk2 → mom_vert_friction::updatecfltruncationvalue
mom_dynamics_split_rk2::step_mom_dyn_split_rk2 → mom_vert_friction::updatecfltruncationvalue
mom_dynamics_split_rk2b::initialize_dyn_split_rk2b → mom_vert_friction::updatecfltruncationvalue
mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b → mom_vert_friction::updatecfltruncationvalue
- subroutine vertvisc_end(CS)
Clean up and deallocate the vertical friction module
- Parameters
CS [inout]
Vertical viscosity control structure that will be deallocated in this subroutine.