# Horizontal Mixing

Horizontal Mixing

## Deviatory Stress Tensor (Horizontal Viscosity)

The horizontal components of the divergence of the stress tensor ( Wajsowicz, 1993) in nondimesional, orthogonal curvilinear coordinates (, , ) with dimensional, spatially-varying metric factors (, , ) and velocity components (, , ) are given by:

 $StartLayout 1st Row 1st Column upper F Superscript u Baseline identical-to ModifyingAbove xi With caret dot left-parenthesis normal nabla dot ModifyingAbove sigma With right-arrow right-parenthesis equals StartFraction m n Over upper H Subscript z Baseline EndFraction left-bracket 2nd Column StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline sigma Subscript xi xi Baseline Over n EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline sigma Subscript xi eta Baseline Over m EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential s EndFraction left-parenthesis StartFraction sigma Subscript xi s Baseline Over m n EndFraction right-parenthesis plus 2nd Row 1st Column Blank 2nd Column upper H Subscript z Baseline sigma Subscript xi eta Baseline StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction 1 Over m EndFraction right-parenthesis minus upper H Subscript z Baseline sigma Subscript eta eta Baseline StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction 1 Over n EndFraction right-parenthesis minus StartFraction 1 Over n EndFraction sigma Subscript s s Baseline StartFraction normal partial-differential upper H Subscript z Baseline Over normal partial-differential xi EndFraction right-bracket EndLayout$ (1)
 $StartLayout 1st Row 1st Column upper F Superscript v Baseline identical-to ModifyingAbove eta With caret dot left-parenthesis normal nabla dot ModifyingAbove sigma With right-arrow right-parenthesis equals StartFraction m n Over upper H Subscript z Baseline EndFraction left-bracket 2nd Column StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline sigma Subscript eta xi Baseline Over n EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline sigma Subscript eta eta Baseline Over m EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential s EndFraction left-parenthesis StartFraction sigma Subscript eta s Baseline Over m n EndFraction right-parenthesis plus 2nd Row 1st Column Blank 2nd Column upper H Subscript z Baseline sigma Subscript eta xi Baseline StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction 1 Over n EndFraction right-parenthesis minus upper H Subscript z Baseline sigma Subscript xi xi Baseline StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction 1 Over m EndFraction right-parenthesis minus StartFraction 1 Over m EndFraction sigma Subscript s s Baseline StartFraction normal partial-differential upper H Subscript z Baseline Over normal partial-differential eta EndFraction right-bracket EndLayout$ (2)

where

 $StartLayout 1st Row 1st Column sigma Subscript xi xi 2nd Column equals left-parenthesis upper A Subscript upper M Baseline plus nu right-parenthesis e Subscript xi xi Baseline plus left-parenthesis nu minus upper A Subscript upper M Baseline right-parenthesis e Subscript eta eta Baseline comma 2nd Row 1st Column sigma Subscript eta eta 2nd Column equals left-parenthesis nu minus upper A Subscript upper M Baseline right-parenthesis e Subscript xi xi Baseline plus left-parenthesis upper A Subscript upper M Baseline plus nu right-parenthesis e Subscript eta eta Baseline comma 3rd Row 1st Column sigma Subscript s s 2nd Column equals 2 nu e Subscript s s Baseline comma 4th Row 1st Column sigma Subscript xi eta 2nd Column equals sigma Subscript eta xi Baseline equals 2 upper A Subscript upper M Baseline e Subscript xi eta Baseline comma 5th Row 1st Column sigma Subscript xi s 2nd Column equals 2 upper K Subscript upper M Baseline e Subscript xi s Baseline comma 6th Row 1st Column sigma Subscript eta s 2nd Column equals 2 upper K Subscript upper M Baseline e Subscript eta s Baseline comma EndLayout$ (3)

and the strain field is:

 $StartLayout 1st Row 1st Column e Subscript xi xi 2nd Column equals m StartFraction normal partial-differential u Over normal partial-differential xi EndFraction plus m n v StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction 1 Over m EndFraction right-parenthesis comma 2nd Row 1st Column e Subscript eta eta 2nd Column equals n StartFraction normal partial-differential v Over normal partial-differential eta EndFraction plus m n u StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction 1 Over n EndFraction right-parenthesis comma 3rd Row 1st Column e Subscript s s 2nd Column equals StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis omega upper H Subscript z Baseline right-parenthesis Over normal partial-differential s EndFraction plus StartFraction m Over upper H Subscript z Baseline EndFraction u StartFraction normal partial-differential upper H Subscript z Baseline Over normal partial-differential xi EndFraction plus StartFraction n Over upper H Subscript z Baseline EndFraction v StartFraction normal partial-differential upper H Subscript z Baseline Over normal partial-differential eta EndFraction comma 4th Row 1st Column 2 e Subscript xi eta 2nd Column equals StartFraction m Over n EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction plus StartFraction n Over m EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction comma 5th Row 1st Column 2 e Subscript xi s 2nd Column equals StartFraction 1 Over m upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential s EndFraction plus m upper H Subscript z Baseline StartFraction normal partial-differential omega Over normal partial-differential xi EndFraction comma 6th Row 1st Column 2 e Subscript eta s 2nd Column equals StartFraction 1 Over n upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential s EndFraction plus n upper H Subscript z Baseline StartFraction normal partial-differential omega Over normal partial-differential eta EndFraction period EndLayout$ (4)

Here, and are the spatially varying horizontal and vertical viscosity coefficients, respectively, and is another (very small, often neglected) horizontal viscosity coefficient. Notice that because of the generalized terrain-following vertical coordinates of ROMS, we need to transform the horizontal partial derivatives from constant z-surfaces to constant s-surfaces. And the vertical metric or level thickness is the Jacobian of the transformation, . Also in these models, the vertical velocity is computed as and has units of .

### Transverse Stress Tensor

Assuming transverse isotropy, as in Sadourny and Maynard (1997) and Griffies and Hallberg (2000), the deviatoric stress tensor can be split into vertical and horizontal sub-tensors. The horizontal (or transverse) sub-tensor is symmetric, it has a null trace, and it possesses axial symmetry in the local vertical direction. Then, transverse stress tensor can be derived from (1) and (2) yielding

 $StartLayout 1st Row 1st Column upper H Subscript z Baseline upper F Superscript u 2nd Column equals n squared m StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript u xi Baseline Over n EndFraction right-parenthesis plus m squared n StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript u eta Baseline Over m EndFraction right-parenthesis 2nd Row 1st Column upper H Subscript z Baseline upper F Superscript v 2nd Column equals n squared m StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript v xi Baseline Over n EndFraction right-parenthesis plus m squared n StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript v eta Baseline Over m EndFraction right-parenthesis EndLayout$ (5)

where

 $StartLayout 1st Row 1st Column upper F Superscript u xi 2nd Column equals StartFraction 1 Over n EndFraction upper A Subscript upper M Baseline left-bracket StartFraction m Over n EndFraction StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential xi EndFraction minus StartFraction n Over m EndFraction StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential eta EndFraction right-bracket comma 2nd Row 1st Column upper F Superscript u eta 2nd Column equals StartFraction 1 Over m EndFraction upper A Subscript upper M Baseline left-bracket StartFraction n Over m EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction plus StartFraction m Over n EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction right-bracket comma 3rd Row 1st Column upper F Superscript v xi 2nd Column equals StartFraction 1 Over n EndFraction upper A Subscript upper M Baseline left-bracket StartFraction m Over n EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction plus StartFraction n Over m EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction right-bracket comma 4th Row 1st Column upper F Superscript v eta 2nd Column equals StartFraction 1 Over m EndFraction upper A Subscript upper M Baseline left-bracket StartFraction n Over m EndFraction StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential eta EndFraction minus StartFraction m Over n EndFraction StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential xi EndFraction right-bracket period EndLayout$ (6)

Notice the flux form of (5) and the symmetry between the and terms which are defined at density points on a C-grid. Similarly, the and terms are symmetric and defined at vorticity points. These staggering positions are optimal for the discretization of the tensor; it has no computational modes and satisfy first-moment conservation.

The biharmonic friction operator can be computed by applying twice the tensor operator (5), but with the squared root of the biharmonic viscosity coefficient (Griffies and Hallberg, 2000). For simplicity and momentum balance, the thickness appears only when computing the second harmonic operator as in Griffies and Hallberg (2000).

### Rotated Transverse Stress Tensor

In some applications with tall and steep topography, it will be advantageous to reduce substantially the contribution of the stress tensor (5) to the vertical mixing when operating along constant -surfaces. The transverse stress tensor rotated along geopotentials (constant depth) is, then, given by

 $StartLayout 1st Row 1st Column upper H Subscript z Baseline upper R Superscript u 2nd Column equals n squared m StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper R Superscript u xi Baseline Over n EndFraction right-parenthesis plus m squared n StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper R Superscript u eta Baseline Over m EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential s EndFraction left-parenthesis upper R Superscript u s Baseline right-parenthesis 2nd Row 1st Column upper H Subscript z Baseline upper R Superscript v 2nd Column equals n squared m StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper R Superscript v xi Baseline Over n EndFraction right-parenthesis plus m squared n StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper R Superscript v eta Baseline Over m EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential s EndFraction left-parenthesis upper R Superscript v s Baseline right-parenthesis EndLayout$ (7)

where

 $StartLayout 1st Row 1st Column upper R Superscript u xi Baseline equals 2nd Column StartFraction 1 Over n EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential xi EndFraction minus m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential s EndFraction right-parenthesis minus StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential eta EndFraction minus n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential s EndFraction right-parenthesis right-bracket comma 2nd Row 1st Column upper R Superscript u eta Baseline equals 2nd Column StartFraction 1 Over m EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction minus n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential s EndFraction right-parenthesis plus StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction minus m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential s EndFraction right-parenthesis right-bracket comma 3rd Row 1st Column upper R Superscript u s Baseline equals 2nd Column m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential s EndFraction minus m StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential xi EndFraction right-parenthesis minus StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential s EndFraction minus n StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential eta EndFraction right-parenthesis right-bracket plus 4th Row 1st Column Blank 2nd Column n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential s EndFraction minus n StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction right-parenthesis plus StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential s EndFraction minus m StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction right-parenthesis right-bracket comma EndLayout$ (8)

 $StartLayout 1st Row 1st Column upper R Superscript v xi Baseline equals 2nd Column StartFraction 1 Over n EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction minus m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential s EndFraction right-parenthesis plus StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction minus n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential s EndFraction right-parenthesis right-bracket comma 2nd Row 1st Column upper R Superscript v eta Baseline equals 2nd Column StartFraction 1 Over m EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential eta EndFraction minus n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential s EndFraction right-parenthesis minus StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential xi EndFraction minus m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential s EndFraction right-parenthesis right-bracket comma 3rd Row 1st Column upper R Superscript v s Baseline equals 2nd Column m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential s EndFraction minus m StartFraction normal partial-differential left-parenthesis n v right-parenthesis Over normal partial-differential xi EndFraction right-parenthesis plus StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential s EndFraction minus n StartFraction normal partial-differential left-parenthesis m u right-parenthesis Over normal partial-differential eta EndFraction right-parenthesis right-bracket plus 4th Row 1st Column Blank 2nd Column n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction upper A Subscript upper M Baseline left-bracket StartFraction 1 Over m EndFraction left-parenthesis n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential s EndFraction minus n StartFraction normal partial-differential left-parenthesis m v right-parenthesis Over normal partial-differential eta EndFraction right-parenthesis minus StartFraction 1 Over n EndFraction left-parenthesis m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential s EndFraction minus m StartFraction normal partial-differential left-parenthesis n u right-parenthesis Over normal partial-differential xi EndFraction right-parenthesis right-bracket period EndLayout$ (9)

Notice that transverse stress tensor remains invariant under coordinate transformation. The rotated tensor (7) retains the same properties as the unrotated tensor (5). The additional terms that arise from the slopes of -surfaces along geopotentials are discretized using a modified version of the triad approach of Griffies et al. (1998).

## Horizontal Diffusion

### Laplacian

The Laplacian of a scalar in curvilinear coordinates is:

 $normal nabla squared upper C equals normal nabla dot normal nabla upper C equals m n left-bracket StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction m Over n EndFraction StartFraction normal partial-differential upper C Over normal partial-differential xi EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction n Over m EndFraction StartFraction normal partial-differential upper C Over normal partial-differential eta EndFraction right-parenthesis right-bracket$ (10)

In ROMS, this term is multiplied by and becomes

 $left-bracket StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction nu 2 upper H Subscript z Baseline m Over n EndFraction StartFraction normal partial-differential upper C Over normal partial-differential xi EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction nu 2 upper H Subscript z Baseline n Over m EndFraction StartFraction normal partial-differential upper C Over normal partial-differential eta EndFraction right-parenthesis right-bracket$ (11)

where is any tracer. This form guarantees that the term does not contribute to the volume-integrated equations.

### Biharmonic

The biharmonic operator is ; the corresponding term is computed using a temporary variable :

 $upper Y equals StartFraction m n Over upper H Subscript z Baseline EndFraction left-bracket StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline m Over n EndFraction StartFraction normal partial-differential upper C Over normal partial-differential xi EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline n Over m EndFraction StartFraction normal partial-differential upper C Over normal partial-differential eta EndFraction right-parenthesis right-bracket$ (12)

and is

 $minus left-bracket StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline m Over n EndFraction StartFraction normal partial-differential upper Y Over normal partial-differential xi EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline n Over m EndFraction StartFraction normal partial-differential upper Y Over normal partial-differential eta EndFraction right-parenthesis right-bracket$ (13)

where is once again any tracer and is the square root of the input value so that it can be applied twice.

### Rotated mixing tensors

Both the Laplacian and biharmonic terms above operate on surfaces of constant and can contribute substantially to the vertical mixing. However, the oceans are thought to mix along constant density surfaces so this is not entirely satisfactory. Therefore, the option of using rotated mixing tensors for the Laplacian and biharmonic operators has been added. Options exist to diffuse on constant surfaces (MIX_GEO_TS) and constant potential density surfaces (MIX_ISO_TS).

The horizontal Laplacian diffusion operator is computed by finding the three components of the flux of the quantity . The and components are locally horizontal, rather than along the surface. The diffusive fluxes are:

 $StartLayout 1st Row 1st Column upper F Superscript xi 2nd Column equals nu 2 left-bracket m StartFraction normal partial-differential upper C Over normal partial-differential xi EndFraction minus ModifyingBelow left-parenthesis m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction ModifyingBelow plus upper S Subscript x Baseline With bottom-brace Underscript MIX normal bar ISO Endscripts right-parenthesis StartFraction normal partial-differential upper C Over normal partial-differential z EndFraction With bottom-brace Underscript MIX normal bar GEO Endscripts right-bracket 2nd Row 1st Column upper F Superscript eta 2nd Column equals nu 2 left-bracket n StartFraction normal partial-differential upper C Over normal partial-differential eta EndFraction minus ModifyingBelow left-bracket n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction ModifyingBelow plus upper S Subscript y Baseline With bottom-brace Underscript MIX normal bar ISO Endscripts right-parenthesis StartFraction normal partial-differential upper C Over normal partial-differential z EndFraction With bottom-brace Underscript MIX normal bar GEO Endscripts right-bracket 3rd Row 1st Column upper F Superscript s 2nd Column equals minus ModifyingBelow StartFraction 1 Over upper H Subscript z Baseline EndFraction left-parenthesis m StartFraction normal partial-differential z Over normal partial-differential xi EndFraction ModifyingBelow plus upper S Subscript x Baseline With bottom-brace Underscript MIX normal bar ISO Endscripts right-parenthesis upper F Superscript xi Baseline With bottom-brace Underscript MIX normal bar GEO Endscripts minus ModifyingBelow StartFraction 1 Over upper H Subscript z Baseline EndFraction left-parenthesis n StartFraction normal partial-differential z Over normal partial-differential eta EndFraction ModifyingBelow plus upper S Subscript y Baseline With bottom-brace Underscript MIX normal bar ISO Endscripts right-parenthesis upper F Superscript eta Baseline With bottom-brace Underscript MIX normal bar GEO Endscripts EndLayout$ (14)

where

 $StartLayout 1st Row 1st Column upper S Subscript x 2nd Column equals StartStartFraction StartFraction normal partial-differential rho Over normal partial-differential x EndFraction OverOver StartFraction normal partial-differential rho Over normal partial-differential z EndFraction EndEndFraction equals StartStartFraction left-bracket m StartFraction normal partial-differential rho Over normal partial-differential xi EndFraction minus StartFraction m Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential z Over normal partial-differential xi EndFraction StartFraction normal partial-differential rho Over normal partial-differential s EndFraction right-bracket OverOver StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential rho Over normal partial-differential s EndFraction EndEndFraction 2nd Row 1st Column upper S Subscript y 2nd Column equals StartStartFraction StartFraction normal partial-differential rho Over normal partial-differential y EndFraction OverOver StartFraction normal partial-differential rho Over normal partial-differential z EndFraction EndEndFraction equals StartStartFraction left-bracket n StartFraction normal partial-differential rho Over normal partial-differential eta EndFraction minus StartFraction n Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential z Over normal partial-differential eta EndFraction StartFraction normal partial-differential rho Over normal partial-differential s EndFraction right-bracket OverOver StartFraction 1 Over upper H Subscript z Baseline EndFraction StartFraction normal partial-differential rho Over normal partial-differential s EndFraction EndEndFraction EndLayout$ (15)

and there is some trickery such that the computations depend on the sign of and of . No flux boundary conditions are easily imposed by setting

Finally, the flux divergence is calculated and is added to the right-hand-side term for the field being computed:

 $StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript xi Baseline Over n EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript eta Baseline Over m EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential s EndFraction left-parenthesis StartFraction upper H Subscript z Baseline upper F Superscript s Baseline Over m n EndFraction right-parenthesis$ (16)

The biharmonic rotated mixing tensors are computed much as the non-rotated biharmonic mixing. We define a temporary variable based on equation (16):

 $upper Y equals StartFraction m n Over upper H Subscript z Baseline EndFraction left-bracket StartFraction normal partial-differential Over normal partial-differential xi EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline upper F Superscript xi Baseline Over n EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential eta EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline upper F Superscript eta Baseline Over m EndFraction right-parenthesis plus StartFraction normal partial-differential Over normal partial-differential s EndFraction left-parenthesis StartFraction nu 4 upper H Subscript z Baseline upper F Superscript s Baseline Over m n EndFraction right-parenthesis right-bracket period$ (17)

We then build up fluxes of as in equations (14). We then apply equation (16) to these fluxes to obtain the biharmonic mixing tensors. Again, the value of is the square root of that read in so that it can be applied twice.

## Guidelines for Coefficient Values

The horizontal viscosity and diffusion coefficients are scalars which are read in from roms.in. Several factors to consider when choosing these values are:

• spindown time The spindown time on wavenumber is for the Laplacian operator and for the biharmonic operator. The smallest wavenumber corresponds to the length and is , leading to

This time should be short enough to damp out the numerical noise which is being generated but long enough on the larger scales to retain the features you are interested in. This time should also be resolved by the model timestep.

• boundary layer thickness The western boundary layer has a thickness proportional to:

for the Laplacian and biharmonic viscosity, respectively. We have found that the model typically requires the boundary layer to be resolved with at least one grid cell. This leads to coarse grids requiring large values of .

### Horizontal Diffusion

We have chosen anything from zero to the value of the horizontal viscosity for the horizontal diffusion coefficient. One common choice is an order of magnitude smaller than the viscosity.