namespace mom_thickness_diffuse

Overview

Thickness diffusion (or Gent McWilliams) More…

namespace mom_thickness_diffuse {

// global functions

subroutine, public thickness_diffuse(
    h h,
    uhtr uhtr,
    vhtr vhtr,
    tv tv,
    dt dt,
    G G,
    GV GV,
    US US,
    MEKE MEKE,
    VarMix VarMix,
    CDp CDp,
    CS CS
    );

subroutine, public thickness_diffuse_init(
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    CDp CDp,
    CS CS
    );

subroutine, public thickness_diffuse_get_kh(CS CS, KH_u_GME KH_u_GME, KH_v_GME KH_v_GME, G G);
subroutine, public thickness_diffuse_end(CS CS);

} // namespace mom_thickness_diffuse

Detailed Documentation

Thickness diffusion (or Gent McWilliams)

Thickness diffusion (aka Gent-McWilliams)

Thickness diffusion is implemented via along-layer mass fluxes

\[h^\dagger \leftarrow h^n - \Delta t \nabla \cdot ( \vec{uh}^* )\]

where the mass fluxes are cast as the difference in vector streamfunction

\[\vec{uh}^* = \delta_k \vec{\psi} .\]

The GM implementation of thickness diffusion made the streamfunction proportional to the potential density slope

\[\vec{\psi} = - \kappa_h \frac{\nabla_z \rho}{\partial_z \rho} = \frac{g\kappa_h}{\rho_o} \frac{\nabla \rho}{N^2} = \kappa_h \frac{M^2}{N^2}\]

but for robustness the scheme is implemented as

\[\vec{\psi} = \kappa_h \frac{M^2}{\sqrt{N^4 + M^4}}\]

since the quantity \(\frac{M^2}{\sqrt{N^2 + M^2}}\) is bounded between $-1$ and $1$ and does not change sign if \(N^2<0\).

Optionally, the method of Ferrari et al, 2010, can be used to obtain the streamfunction which solves the vertically elliptic equation:

\[\gamma_F \partial_z c^2 \partial_z \psi - N_*^2 \psi = ( 1 + \gamma_F ) \kappa_h N_*^2 \frac{M^2}{\sqrt{N^4+M^4}}\]

which recovers the previous streamfunction relation in the limit that \(c \rightarrow 0\). Here, \(c=\max(c_{min},c_g)\) is the maximum of either \(c_{min}\) and either the first baroclinic mode wave-speed or the equivalent barotropic mode wave-speed. \(N_*^2 = \max(N^2,0)\) is a non-negative form of the square of the Brunt-Vaisala frequency. The parameter \(\gamma_F\) is used to reduce the vertical smoothing length scale. This elliptic form for \(\psi\) is turned on with the logical KHTH_USE_FGNV_STREAMFUNCTION.

Thickness diffusivities are calculated independently at u- and v-points using the following expression

\[\kappa_h = \left( \kappa_o + \alpha_{s} L_{s}^2 < S N > + \alpha_{M} \kappa_{M} \right) r(\Delta x,L_d)\]

where \(S\) is the isoneutral slope magnitude, \(N\) is the square root of Brunt-Vaisala frequency, \(\kappa_{M}\) is the diffusivity calculated by the MEKE parameterization (mom_meke module) and \(r(\Delta x,L_d)\) is a function of the local resolution (ratio of grid-spacing, \(\Delta x\), to deformation radius, \(L_d\)). The length \(L_s\) is provided by the mom_lateral_mixing_coeffs module (enabled with USE_VARIABLE_MIXING=True and the term \(<SN>\) is the vertical average slope times the Brunt-Vaisala frequency prescribed by Visbeck et al., 1996.

The result of the above expression is subsequently bounded by minimum and maximum values, including an upper diffusivity consistent with numerical stability (\(\kappa_{cfl}\) is calculated internally).

\[\kappa_h \leftarrow \min{\left( \kappa_{max}, \kappa_{cfl}, \max{\left( \kappa_{min}, \kappa_h \right)} \right)} f(c_g,z)\]

where \(f(c_g,z)\) is a vertical structure function. \(f(c_g,z)\) is calculated in module mom_lateral_mixing_coeffs. If KHTH_USE_EBT_STRUCT=True then \(f(c_g,z)\) is set to look like the equivalent barotropic modal velocity structure. Otherwise \(f(c_g,z)=1\) and the diffusivity is independent of depth.

In order to calculate meaningful slopes in vanished layers, temporary copies of the thermodynamic variables are passed through a vertical smoother, function vert_fill_ts() :

\[\begin{split}\begin{eqnarray*} \left[ 1 + \Delta t \kappa_{smth} \frac{\partial^2}{\partial_z^2} \right] \theta & \leftarrow & \theta \\ \left[ 1 + \Delta t \kappa_{smth} \frac{\partial^2}{\partial_z^2} \right] s & \leftarrow & s \end{eqnarray*}\end{split}\]

Module mom_thickness_diffuse parameters

References

Ferrari, R., S.M. Griffies, A.J.G. Nurser and G.K. Vallis, 2010: A boundary-value problem for the parameterized mesoscale eddy transport. Ocean Modelling, 32, 143-156. http://doi.org/10.1016/j.ocemod.2010.01.004

Viscbeck, M., J.C. Marshall, H. Jones, 1996: On he dynamics of convective “chimneys” in the ocean. J. Phys. Oceangr., 26, 1721-1734. http://dx.doi.org/10.1175/1520-0485(1996)026%3C1721:DOICRI%3E2.0.CO;2

Global Functions

subroutine, public thickness_diffuse(
    h h,
    uhtr uhtr,
    vhtr vhtr,
    tv tv,
    dt dt,
    G G,
    GV GV,
    US US,
    MEKE MEKE,
    VarMix VarMix,
    CDp CDp,
    CS CS
    )

Calculates thickness diffusion coefficients and applies thickness diffusion to layer thicknesses, h. Diffusivities are limited to ensure stability. Also returns along-layer mass fluxes used in the continuity equation.

Parameters:

g

Ocean grid structure

gv

Vertical grid structure

us

A dimensional unit scaling type

h

Layer thickness [H ~> m or kg m-2]

uhtr

Accumulated zonal mass flux [L2 H ~> m3 or kg]

vhtr

Accumulated meridional mass flux [L2 H ~> m3 or kg]

tv

Thermodynamics structure

dt

Time increment [s]

meke

MEKE control structure

varmix

Variable mixing coefficients

cdp

Diagnostics for the continuity equation

cs

Control structure for thickness diffusion

subroutine, public thickness_diffuse_init(
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    CDp CDp,
    CS CS
    )

Initialize the thickness diffusion module/structure.

Parameters:

time

Current model time

g

Ocean grid structure

gv

Vertical grid structure

us

A dimensional unit scaling type

param_file

Parameter file handles

diag

Diagnostics control structure

cdp

Continuity equation diagnostics

cs

Control structure for thickness diffusion

subroutine, public thickness_diffuse_get_kh(
    CS CS,
    KH_u_GME KH_u_GME,
    KH_v_GME KH_v_GME,
    G G
    )

Copies ubtav and vbtav from private type into arrays.

Parameters:

cs

Control structure for this module

g

Grid structure

kh_u_gme

interface height diffusivities at u-faces [L2 T-1 ~> m2 s-1]

kh_v_gme

interface height diffusivities at v-faces [L2 T-1 ~> m2 s-1]

subroutine, public thickness_diffuse_end(CS CS)

Deallocate the thickness diffusion control structure.

Parameters:

cs

Control structure for thickness diffusion