MOM6
|
Calculates horizontal viscosity and viscous stresses.
This module contains the subroutine horizontal_viscosity() that calculates the effects of horizontal viscosity, including parameterizations of the value of the viscosity itself. horizontal_viscosity() calculates the acceleration due to some combination of a biharmonic viscosity and a Laplacian viscosity. Either or both may use a coefficient that depends on the shear and strain of the flow. All metric terms are retained. The Laplacian is calculated as the divergence of a stress tensor, using the form suggested by Smagorinsky (1993). The biharmonic is calculated by twice applying the divergence of the stress tensor that is used to calculate the Laplacian, but without the dependence on thickness in the first pass. This form permits a variable viscosity, and indicates no acceleration for either resting fluid or solid body rotation.
The form of the viscous accelerations is discussed extensively in Griffies and Hallberg (2000), and the implementation here follows that discussion closely. We use the notation of Smith and McWilliams (2003) with the exception that the isotropic viscosity is \(\kappa_h\).
In general, the horizontal stress tensor can be written as
\[ {\bf \sigma} = \begin{pmatrix} \frac{1}{2} \left( \sigma_D + \sigma_T \right) & \frac{1}{2} \sigma_S \\\\ \frac{1}{2} \sigma_S & \frac{1}{2} \left( \sigma_D - \sigma_T \right) \end{pmatrix} \]
where \(\sigma_D\), \(\sigma_T\) and \(\sigma_S\) are stresses associated with invariant factors in the strain-rate tensor. For a Newtonian fluid, the stress tensor is usually linearly related to the strain-rate tensor. The horizontal strain-rate tensor is
\[ \dot{\bf e} = \begin{pmatrix} \frac{1}{2} \left( \dot{e}_D + \dot{e}_T \right) & \frac{1}{2} \dot{e}_S \\\\ \frac{1}{2} \dot{e}_S & \frac{1}{2} \left( \dot{e}_D - \dot{e}_T \right) \end{pmatrix} \]
where \(\dot{e}_D = \partial_x u + \partial_y v\) is the horizontal divergence, \(\dot{e}_T = \partial_x u - \partial_y v\) is the horizontal tension, and \(\dot{e}_S = \partial_y u + \partial_x v\) is the horizontal shear strain.
The trace of the stress tensor, \(tr(\bf \sigma) = \sigma_D\), is usually absorbed into the pressure and only the deviatoric stress tensor considered. From here on, we drop \(\sigma_D\). The trace of the strain tensor, \(tr(\bf e) = \dot{e}_D\) is non-zero for horizontally divergent flow but only enters the stress tensor through \(\sigma_D\) and so we will drop \(\sigma_D\) from calculations of the strain tensor in the code. Therefore the horizontal stress tensor can be considered to be
\[ {\bf \sigma} = \begin{pmatrix} \frac{1}{2} \sigma_T & \frac{1}{2} \sigma_S \\\\ \frac{1}{2} \sigma_S & - \frac{1}{2} \sigma_T \end{pmatrix} .\]
The stresses above are linearly related to the strain through a viscosity coefficient, \(\kappa_h\):
\begin{eqnarray*} \sigma_T & = & 2 \kappa_h \dot{e}_T \\\\ \sigma_S & = & 2 \kappa_h \dot{e}_S . \end{eqnarray*}
The viscosity \(\kappa_h\) may either be a constant or variable. For example, \(\kappa_h\) may vary with the shear, as proposed by Smagorinsky (1993).
The accelerations resulting form the divergence of the stress tensor are
\begin{eqnarray*} \hat{\bf x} \cdot \left( \nabla \cdot {\bf \sigma} \right) & = & \partial_x \left( \frac{1}{2} \sigma_T \right) + \partial_y \left( \frac{1}{2} \sigma_S \right) \\\\ & = & \partial_x \left( \kappa_h \dot{e}_T \right) + \partial_y \left( \kappa_h \dot{e}_S \right) \\\\ \hat{\bf y} \cdot \left( \nabla \cdot {\bf \sigma} \right) & = & \partial_x \left( \frac{1}{2} \sigma_S \right) + \partial_y \left( \frac{1}{2} \sigma_T \right) \\\\ & = & \partial_x \left( \kappa_h \dot{e}_S \right) + \partial_y \left( - \kappa_h \dot{e}_T \right) . \end{eqnarray*}
The form of the Laplacian viscosity in general coordinates is:
\begin{eqnarray*} \hat{\bf x} \cdot \left( \nabla \cdot \sigma \right) & = & \frac{1}{h} \left[ \partial_x \left( \kappa_h h \dot{e}_T \right) + \partial_y \left( \kappa_h h \dot{e}_S \right) \right] \\\\ \hat{\bf y} \cdot \left( \nabla \cdot \sigma \right) & = & \frac{1}{h} \left[ \partial_x \left( \kappa_h h \dot{e}_S \right) - \partial_y \left( \kappa_h h \dot{e}_T \right) \right] . \end{eqnarray*}
The horizontal viscosity coefficient, \(\kappa_h\), can have multiple components. The isotropic components are:
A maximum stable viscosity, \(\kappa_{max}(x,y)\) is calculated based on the grid-spacing and time-step and used to clip calculated viscosities.
The static components of \(\kappa_h\) are first combined as follows:
\[ \kappa_{static} = \min \left[ \max\left( \kappa_{bg}, U_\nu \Delta(x,y), \kappa_{2d}(x,y), \kappa_\phi(x,y) \right) , \kappa_{max}(x,y) \right] \]
and stored in the module control structure as variables Kh_bg_xx
and Kh_bg_xy
for the tension (h-points) and shear (q-points) components respectively.
The full viscosity includes the dynamic components as follows:
\[ \kappa_h(x,y,t) = r(\Delta,L_d) \max \left( \kappa_{static}, \kappa_{Sm}, \kappa_{Lth} \right) \]
where \(r(\Delta,L_d)\) is a resolution function.
The dynamic Smagorinsky and Leith viscosity schemes are exclusive with each other.
Free slip boundary conditions have been coded, although no slip boundary conditions can be used with the Laplacian viscosity based on the 2D land-sea mask. For a western boundary, for example, the boundary conditions with the biharmonic operator would be written as:
\[ \partial_x v = 0 ; \partial_x^3 v = 0 ; u = 0 ; \partial_x^2 u = 0 , \]
while for a Laplacian operator, they are simply
\[ \partial_x v = 0 ; u = 0 . \]
These boundary conditions are largely dictated by the use of an Arakawa C-grid and by the varying layer thickness.
Large et al., 2001, proposed enhancing viscosity in a particular direction and the approach was generalized in Smith and McWilliams, 2003. We use the second form of their two coefficient anisotropic viscosity (section 4.3). We also replace their \(A^\prime\) and $D$ such that \(2A^\prime = 2 \kappa_h + D\) and \(\kappa_a = D\) so that \(\kappa_h\) can be considered the isotropic viscosity and \(\kappa_a=D\) can be consider the anisotropic viscosity. The direction of anisotropy is defined by a unit vector \(\hat{\bf n}=(n_1,n_2)\).
The contributions to the stress tensor are
\[ \begin{pmatrix} \sigma_T \\\\ \sigma_S \end{pmatrix} = \left[ \begin{pmatrix} 2 \kappa_h + \kappa_a & 0 \\\\ 0 & 2 \kappa_h \end{pmatrix} + 2 \kappa_a n_1 n_2 \begin{pmatrix} - 2 n_1 n_2 & n_1^2 - n_2^2 \\\\ n_1^2 - n_2^2 & 2 n_1 n_2 \end{pmatrix} \right] \begin{pmatrix} \dot{e}_T \\\\ \dot{e}_S \end{pmatrix} \]
Dissipation of kinetic energy requires \(\kappa_h \geq 0\) and \(2 \kappa_h + \kappa_a \geq 0\). Note that when anisotropy is aligned with the x-direction, \(n_1 = \pm 1\), then \(n_2 = 0\) and the cross terms vanish. The accelerations in this aligned limit with constant coefficients become
\begin{eqnarray*} \hat{\bf x} \cdot \nabla \cdot {\bf \sigma} & = & \partial_x \left( \left( \kappa_h + \frac{1}{2} \kappa_a \right) \dot{e}_T \right) + \partial_y \left( \kappa_h \dot{e}_S \right) \\\\ & = & \left( \kappa_h + \kappa_a \right) \partial_{xx} u + \kappa_h \partial_{yy} u - \frac{1}{2} \kappa_a \partial_x \left( \partial_x u + \partial_y v \right) \\\\ \hat{\bf y} \cdot \nabla \cdot {\bf \sigma} & = & \partial_x \left( \kappa_h \dot{e}_S \right) - \partial_y \left( \left( \kappa_h + \frac{1}{2} \kappa_a \right) \dot{e}_T \right) \\\\ & = & \kappa_h \partial_{xx} v + \left( \kappa_h + \kappa_a \right) \partial_{yy} v - \frac{1}{2} \kappa_a \partial_y \left( \partial_x u + \partial_y v \right) \end{eqnarray*}
which has contributions akin to a negative divergence damping (a divergence enhancement?) but which is weaker than the enhanced tension terms by half.
The horizontal tension, \(\dot{e}_T\), is stored in variable sh_xx
and discretized as
\[ \dot{e}_T = \frac{\Delta y}{\Delta x} \delta_i \left( \frac{1}{\Delta y} u \right) - \frac{\Delta x}{\Delta y} \delta_j \left( \frac{1}{\Delta x} v \right) . \]
The horizontal divergent strain, \(\dot{e}_D\), is stored in variable div_xx
and discretized as
\[ \dot{e}_D = \frac{1}{h A} \left( \delta_i \left( \overline{h}^i \Delta y \, u \right) + \delta_j \left( \overline{h}^j\Delta x \, v \right) \right) . \]
Note that for expediency this is the exact discretization used in the continuity equation.
The horizontal shear strain, \(\dot{e}_S\), is stored in variable sh_xy
and discretized as
\[ \dot{e}_S = v_x + u_y \]
where
\begin{align*} v_x &= \frac{\Delta y}{\Delta x} \delta_i \left( \frac{1}{\Delta y} v \right) \\\\ u_y &= \frac{\Delta x}{\Delta y} \delta_j \left( \frac{1}{\Delta x} u \right) \end{align*}
which are calculated separately so that no-slip or free-slip boundary conditions can be applied to \(v_x\) and \(u_y\) where appropriate.
The tendency for the x-component of the divergence of stress is stored in variable diffu
and discretized as
\[ \hat{\bf x} \cdot \left( \nabla \cdot {\bf \sigma} \right) = \frac{1}{A \overline{h}^i} \left( \frac{1}{\Delta y} \delta_i \left( h \Delta y^2 \kappa_h \dot{e}_T \right) + \frac{1}{\Delta x} \delta_j \left( \tilde{h}^{ij} \Delta x^2 \kappa_h \dot{e}_S \right) \right) . \]
The tendency for the y-component of the divergence of stress is stored in variable diffv
and discretized as
\[ \hat{\bf y} \cdot \left( \nabla \cdot {\bf \sigma} \right) = \frac{1}{A \overline{h}^j} \left( \frac{1}{\Delta y} \delta_i \left( \tilde{h}^{ij} \Delta y^2 A_M \dot{e}_S \right) - \frac{1}{\Delta x} \delta_j \left( h \Delta x^2 A_M \dot{e}_T \right) \right) . \]
Griffies, S.M., and Hallberg, R.W., 2000: Biharmonic friction with a Smagorinsky-like viscosity for use in large-scale eddy-permitting ocean models. Monthly Weather Review, 128(8), 2935-2946. https://doi.org/10.1175/1520-0493(2000)128%3C2935:BFWASL%3E2.0.CO;2
Large, W.G., Danabasoglu, G., McWilliams, J.C., Gent, P.R. and Bryan, F.O., 2001: Equatorial circulation of a global ocean climate model with anisotropic horizontal viscosity. Journal of Physical Oceanography, 31(2), pp.518-536. https://doi.org/10.1175/1520-0485(2001)031%3C0518:ECOAGO%3E2.0.CO;2
Smagorinsky, J., 1993: Some historical remarks on the use of nonlinear viscosities. Large eddy simulation of complex engineering and geophysical flows, 1, 69-106.
Smith, R.D., and McWilliams, J.C., 2003: Anisotropic horizontal viscosity for ocean models. Ocean Modelling, 5(2), 129-156. https://doi.org/10.1016/S1463-5003(02)00016-1
Data Types | |
type | hor_visc_cs |
Control structure for horizontal viscosity. More... | |
Functions/Subroutines | |
subroutine, public | horizontal_viscosity (u, v, h, diffu, diffv, MEKE, VarMix, G, GV, US, CS, OBC, BT) |
Calculates the acceleration due to the horizontal viscosity. More... | |
subroutine, public | hor_visc_init (Time, G, US, param_file, diag, CS, MEKE) |
Allocates space for and calculates static variables used by horizontal_viscosity(). hor_visc_init calculates and stores the values of a number of metric functions that are used in horizontal_viscosity(). More... | |
subroutine | align_aniso_tensor_to_grid (CS, n1, n2) |
Calculates factors in the anisotropic orientation tensor to be align with the grid. With n1=1 and n2=0, this recovers the approach of Large et al, 2001. More... | |
subroutine | smooth_gme (CS, G, GME_flux_h, GME_flux_q) |
Apply a 1-1-4-1-1 Laplacian filter one time on GME diffusive flux to reduce any horizontal two-grid-point noise. More... | |
subroutine, public | hor_visc_end (CS) |
Deallocates any variables allocated in hor_visc_init. More... | |
|
private |
Calculates factors in the anisotropic orientation tensor to be align with the grid. With n1=1 and n2=0, this recovers the approach of Large et al, 2001.
cs | Control structure for horizontal viscosity | |
[in] | n1 | i-component of direction vector [nondim] |
[in] | n2 | j-component of direction vector [nondim] |
Definition at line 2123 of file MOM_hor_visc.F90.
Referenced by hor_visc_init().
subroutine, public mom_hor_visc::hor_visc_end | ( | type(hor_visc_cs), pointer | CS | ) |
Deallocates any variables allocated in hor_visc_init.
cs | The control structure returned by a previous call to hor_visc_init. |
Definition at line 2215 of file MOM_hor_visc.F90.
subroutine, public mom_hor_visc::hor_visc_init | ( | type(time_type), intent(in) | Time, |
type(ocean_grid_type), intent(inout) | G, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout), target | diag, | ||
type(hor_visc_cs), pointer | CS, | ||
type(meke_type), pointer | MEKE | ||
) |
Allocates space for and calculates static variables used by horizontal_viscosity(). hor_visc_init calculates and stores the values of a number of metric functions that are used in horizontal_viscosity().
[in] | time | Current model time. |
[in,out] | g | The ocean's grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure to parse for run-time parameters. |
[in,out] | diag | Structure to regulate diagnostic output. |
cs | Pointer to the control structure for this module | |
meke | MEKE data |
Definition at line 1349 of file MOM_hor_visc.F90.
References align_aniso_tensor_to_grid(), and mom_error_handler::mom_error().
Referenced by mom_dynamics_split_rk2::initialize_dyn_split_rk2(), mom_dynamics_unsplit::initialize_dyn_unsplit(), and mom_dynamics_unsplit_rk2::initialize_dyn_unsplit_rk2().
subroutine, public mom_hor_visc::horizontal_viscosity | ( | real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | u, |
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | v, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(inout) | h, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(out) | diffu, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(out) | diffv, | ||
type(meke_type), pointer | MEKE, | ||
type(varmix_cs), pointer | VarMix, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(hor_visc_cs), pointer | CS, | ||
type(ocean_obc_type), optional, pointer | OBC, | ||
type(barotropic_cs), optional, pointer | BT | ||
) |
Calculates the acceleration due to the horizontal viscosity.
A combination of biharmonic and Laplacian forms can be used. The coefficient may either be a constant or a shear-dependent form. The biharmonic is determined by twice taking the divergence of an appropriately defined stress tensor. The Laplacian is determined by doing so once.
To work, the following fields must be set outside of the usual is:ie range before this subroutine is called: u[is-2:ie+2,js-2:je+2] v[is-2:ie+2,js-2:je+2] h[is-1:ie+1,js-1:je+1]
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | u | The zonal velocity [L T-1 ~> m s-1]. |
[in] | v | The meridional velocity [L T-1 ~> m s-1]. |
[in,out] | h | Layer thicknesses [H ~> m or kg m-2]. |
[out] | diffu | Zonal acceleration due to convergence of |
[out] | diffv | Meridional acceleration due to convergence |
meke | Pointer to a structure containing fields related to Mesoscale Eddy Kinetic Energy. | |
varmix | Pointer to a structure with fields that specify the spatially variable viscosities | |
[in] | us | A dimensional unit scaling type |
cs | Control structure returned by a previous call to hor_visc_init. | |
obc | Pointer to an open boundary condition type | |
bt | Pointer to a structure containing barotropic velocities. |
Definition at line 207 of file MOM_hor_visc.F90.
References mom_barotropic::barotropic_get_tav(), mom_lateral_mixing_coeffs::calc_qg_leith_viscosity(), mom_error_handler::mom_error(), mom_open_boundary::obc_direction_n, mom_open_boundary::obc_direction_s, and smooth_gme().
Referenced by mom_dynamics_split_rk2::initialize_dyn_split_rk2(), mom_dynamics_split_rk2::step_mom_dyn_split_rk2(), mom_dynamics_unsplit::step_mom_dyn_unsplit(), and mom_dynamics_unsplit_rk2::step_mom_dyn_unsplit_rk2().
|
private |
Apply a 1-1-4-1-1 Laplacian filter one time on GME diffusive flux to reduce any horizontal two-grid-point noise.
cs | Control structure | |
[in] | g | Ocean grid |
[in,out] | gme_flux_h | GME diffusive flux at h points |
[in,out] | gme_flux_q | GME diffusive flux at q points |
Definition at line 2143 of file MOM_hor_visc.F90.
Referenced by horizontal_viscosity().